Problem/Motivation

CountryManager::getList() returns the same thing as CountryManager::getStandardList() except that modules have had the option to alter it in hook_countries_alter(). Users may want to be able to do this.

Steps to reproduce

Implement hook_countries_alter(). Observe that the altered list of countries is not used by Webform.

Proposed resolution

Replace all instances of CountryManager::getStandardList() with CountryManager::getList().

Remaining tasks

Implement.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork webform-3283192

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Liam Morland created an issue. See original summary.

liam morland’s picture

Status: Active » Needs review
liam morland’s picture

Status: Needs review » Needs work

CountryManager::getList() cannot be called statically. The dependency will need to be injected.

@jrockowitz: Are you supportive of the direction of this patch?

jrockowitz’s picture

Sure as long as there is minimal risk of regressions. This might also be applicable to 6.1.x

psingh10’s picture

Assigned: Unassigned » psingh10
narendra.rajwar27’s picture

Title: Use CountryManager::getList() instead of ::getStandardList() » Use CountryManager::getList() instead of ::getStadardList()
Status: Needs work » Needs review
StatusFileSize
new3.61 KB

adding patch by removing static calls and adding Dependency.

narendra.rajwar27’s picture

Title: Use CountryManager::getList() instead of ::getStadardList() » Use CountryManager::getList() instead of ::getStandardList()

Issue title updated.

jrockowitz’s picture

Version: 6.2.x-dev » 6.1.x-dev
StatusFileSize
new5.12 KB

Re-rolling to improve dependency injection. Most modules should not be altering the issue; therefore this change should also apply to 6.1.x

jrockowitz’s picture

Status: Needs review » Reviewed & tested by the community
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

  • 3ac20d4 committed on 6.1.x
    Issue #3283192 by jrockowitz, narendra.rajwar27: Use CountryManager::...

  • 3ac20d4 committed on 6.x
    Issue #3283192 by jrockowitz, narendra.rajwar27: Use CountryManager::...

  • 3ac20d4 committed on 6.2.x
    Issue #3283192 by jrockowitz, narendra.rajwar27: Use CountryManager::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

psingh10’s picture

Assigned: psingh10 » Unassigned