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.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3283192-10.patch | 5.12 KB | jrockowitz |
| #8 | 3283192-8.patch | 3.61 KB | narendra.rajwar27 |
Issue fork webform-3283192
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:
- 3283192-use-countrymanagergetlist-instead
changes, plain diff MR !194
Comments
Comment #2
cilefen commentedComment #4
liam morlandComment #5
liam morlandCountryManager::getList() cannot be called statically. The dependency will need to be injected.
@jrockowitz: Are you supportive of the direction of this patch?
Comment #6
jrockowitz commentedSure as long as there is minimal risk of regressions. This might also be applicable to 6.1.x
Comment #7
psingh10 commentedComment #8
narendra.rajwar27adding patch by removing static calls and adding Dependency.
Comment #9
narendra.rajwar27Issue title updated.
Comment #10
jrockowitz commentedRe-rolling to improve dependency injection. Most modules should not be altering the issue; therefore this change should also apply to 6.1.x
Comment #11
jrockowitz commentedComment #12
jrockowitz commentedComment #17
psingh10 commented