Typhoon Iran Cities v4.0.0
First stable release of the Laravel 13 / PHP 8.3+ line. If your app is on Laravel 12 or below, stay on ^3.1 until you upgrade Laravel.
Requirements
- PHP 8.3+ (tested through 8.5)
- Laravel 13+
composer require salibhdr/typhoon-iran-cities:^4.0Highlights
- Laravel 13 first-class support — dedicated release line for new apps on Laravel 13+
- Safer, clearer imports — preflight checks, transactional imports, and a new
--freshflag for clean re-imports - Modern PHP internals — backed enums, reorganized traits, and anonymous migration stubs
- Quality & docs — automated test suite, GitHub Actions CI, Codecov, and full EN/FA documentation
Added
- Automated test suite (Orchestra Testbench + PHPUnit) with GitHub Actions CI on PHP 8.3, 8.4, and 8.5
- Import preflight checks — clear error when tables are missing (run
migratebeforeiran:import) --freshoniran:import— truncate target tables before re-importing when CSV data updates- Database indexes on
iran_regions.typeand(type, code)for unite mode - Backed PHP enums:
RegionType,MigrationStub Support\ImportTargetMapfor import target resolution- Mass-assignment protection on
BaseIranModel($guarded = ['id']) - Bilingual documentation hub (
docs/en/,docs/fa/)
Changed
- Breaking for 3.1 users on Laravel ≤ 12: requires Laravel 13 and PHP 8.3+
- Migration stubs (1–8) use anonymous class format (Laravel 11+ style)
- Unite migration stub is self-contained after publish (no package enum references)
iran:initand publish commands respect--no-interaction- Each CSV import runs inside a database transaction
- City coordinate import uses row updates instead of upsert (avoids partial-insert failures)
- Model relationship traits moved under
Models/Traits/ composer.jsontype set tolibrary
Fixed
- README command typos and wording corrections
- CSV parser cleanup (duplicate
array_combine, streaming line reads)
Upgrade from 3.1.x
-
Upgrade your app to Laravel 13 and PHP 8.3+
-
composer require salibhdr/typhoon-iran-cities:^4.0 -
Re-publish artifacts (recommended):
php artisan iran:publish:migrations --force --target=all # add --unite if needed php artisan iran:publish:models --force --target=all php artisan migrate -
Re-import if data changed:
php artisan iran:import --fresh --target=all # add --unite / --with-city-coordinates as needed
Full guide: docs/en/upgrade-guide.md
Unchanged from 3.1
All core features remain available on v4:
- Seven administrative levels (province → village)
- Separate tables or unite mode (
--unite) - Selective import (
--target) - City coordinates (
--with-city-coordinates) - Published migrations/models, Eloquent relationships, and status scopes
Links
Full changelog: 3.1.0...v4.0.0