sokil/php-isocodes-db-i18n
Localized ISO database for the PHP-ISOCODES library, covering country, subdivision, language, currency, and script names. Install via Composer with sokil/php-isocodes; updated monthly with fresh i18n data.
230-g... suffix suggests a substantial commit delta beyond the v4.20.1 tag, increasing the likelihood of ISO data additions, renames, or deprecations.| Risk Area | Mitigation Strategy | Update Impact (4.0.29) |
|---|---|---|
| Data Staleness | Schedule dependency updates and dataset review. | MEDIUM-HIGH: New dataset is v4.20.1-230-g90b9fe56; inspect diff from v4.19.0 before production rollout. |
| Breaking Changes | Run PHPUnit and integration tests for ISO lookups, validation, and serialization. | LOW-MEDIUM: Release notes indicate data-only update in the 4.0.x line, but data changes can still break assumptions. |
| Deprecated/Renamed Codes | Validate production country_code, subdivision_code, and language_code values against the new dataset. |
MEDIUM-HIGH: Opaque dataset delta requires explicit validation. |
| Localization Gaps | Verify translations for newly added or renamed regions. | LOW-MEDIUM: Possible if subdivisions/countries changed. |
| Memory Usage | Continue loading subsets where possible. | LOW: No documented runtime change. |
| Testing Coverage | Add fixtures for new and deprecated ISO codes. | HIGH: Add regression tests around changed data and cache invalidation. |
| Dataset Traceability | Record package version and dataset version in deployment notes. | MEDIUM: Release notes do not include a human-readable changelog. |
composer.json pin 4.0.29 during validation, then move to a controlled ^4.0 policy after tests pass?composer require sokil/php-isocodes-db-i18n:4.0.29
composer require sokil/php-isocodes-db-i18n:4.0.29
// config/app.php
'providers' => [
Sokil\IsoCodes\IsoCodesServiceProvider::class,
],
php artisan vendor:publish --provider="Sokil\IsoCodes\IsoCodesServiceProvider"
Confirm no new configuration options are required.use Sokil\IsoCodes\Facades\IsoCodes;
IsoCodes::getAllCountries();
IsoCodes::getSubdivisions('US');
IsoCodes::getCountryName('CS'); // Deprecated-code behavior check
$invalidCountryCodes = DB::table('users')
->whereNotIn('country_code', IsoCodes::getAllCountryCodes())
->get();
Repeat for subdivision and language code columns where applicable.composer.json, run test suite, and confirm service provider/facade behavior.^4.0 update policy.IsoCodes::getAllCountries();
IsoCodes::getSubdivisions('FR');
IsoCodes::getCountryName('CS');
| Scenario | Impact | Mitigation |
|---|---|---|
| Deprecated or removed ISO code in production data | Validation failures, broken reports, or incorrect labels | Run code validation migration; add fallback mappings. |
| Renamed subdivision/country labels | UI inconsistency or export mismatch | Refresh dropdowns and translation fixtures; snapshot-test labels. |
| Stale cache after deployment | Users see old country/subdivision lists | Invalidate caches or version cache keys by package/dataset version. |
| Serialization/deserialization assumes old schema | API or queue payload failures | Test JSON serialization and any cached DTOs; clear stale payloads. |
| Frontend options out of sync | Users cannot select new codes or see removed ones | Regenerate frontend option lists from the new dataset. |
| Package rollback needed | Mixed dataset behavior across environments | Keep 4.0.28 pinned rollback path and test downgrade in staging. |
How can I help you explore Laravel packages today?