- ๐ณ๐ฟNew Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.
Also, I reproduce this problem.
- ๐ฎ๐ณIndia Binoli Lalani Gujarat
binoli lalani โ made their first commit to this issueโs fork.
- Merge request !10324Issue #3478408: update-countries.sh inadvertently broken by Issue #3328454 โ (Open) created by Binoli Lalani
- ๐ฎ๐ณIndia jaydev bhatt Pune, Maharashtra
jaydev bhatt โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia jaydev bhatt Pune, Maharashtra
I have tested the updated code on Drupal 11.1.1 and reviewed the changes thoroughly. With the updates made to the script, the
update-countries.sh
file now runs without any issues. Additionally, I have ensured that the code aligns with the latest version of the 11.x branch.I am moving this issue to Needs Review (NR) for further verification. However, based on my testing and review, this patch appears to be ready for RTBC (Reviewed & Tested by the Community).
Thank you!
- ๐บ๐ธUnited States smustgrave
Was previously tagged for tests which are still needed it appears.
- ๐ฎ๐ณIndia jaydev bhatt Pune, Maharashtra
I am working on writing PHPUnit test cases for the update-countries script. The test currently verifies the following:
โข The script correctly reads and processes the territories.json file.
โข Excluded country codes (e.g., โEUโ, โUNโ, โZZโ) are not included in the final country list.
โข The updated country list is properly written to CountryManager.php.Are there any additional test cases that should be considered to ensure full coverage? Feedback is welcome!
- ๐ฎ๐ณIndia jaydev bhatt Pune, Maharashtra
Upon debugging the issue further and for writing the test properly.
found out that the issue which is mentioned in the description to run theupdate-countries.sh
to Update theCountryManager.php
here the .sh file it self is generating the error with the 11.x code base and not updating the
CountryManager.php file.
i setup the drupalsetup using ddev and was trying to run the sh file like this
ddev exec php core/scripts/update-countries.sh
and got the following errorPHP Fatal error: Uncaught Error: Call to undefined function Drupal\Core\Locale\t() in /Users/abc/Developer/DrupalProject/core/lib/Drupal/Core/Locale/CountryManager.php:45 Stack trace: #0 /Users/abc/Developer/DrupalProject/core/scripts/update-countries.sh(43): Drupal\Core\Locale\CountryManager::getStandardList() #1 {main} thrown in /Users/abc/Developer/DrupalProject/core/lib/Drupal/Core/Locale/CountryManager.php on line 45
keep this on need work as need more input on this error of the .sh file.