kossa/algerian-cities
Laravel package that ships Algeria's administrative divisions, wilayas (provinces) and communes, as ready-made Eloquent models, migrations and seeders. Add reliable Algerian location data to your app fast, complete with relationships and easy lookup helpers.
Architecture fit. kossa/algerian-cities is a data-oriented Laravel package (wilaya/commune reference data with accompanying models, migrations, and seeders). It fits naturally as a supporting domain module in Laravel applications that need Algerian administrative geography — delivery addressing, KYC/onboarding, logistics routing, or regulatory reporting. It is not a general-purpose business package; its value is bundling authoritative reference data plus Eloquent integration, so fit is high only where that dataset is directly consumed.
Integration feasibility. v4.1.2 is a compatibility and hardening release rather than a feature release: it adds Laravel 12 support (PR #27), extends CI to PHP 8.4 and stability testing, adds Larastan ^3.0 static analysis support (PR #24), and refreshes two GitHub Actions dependencies via Dependabot. The version is a patch bump, and nothing in the notes signals schema, API, or namespace changes. That makes trial integration low-cost: install, publish migrations/config, seed, and validate against our own address records.
Technical risk.
composer.json and that the package works with our PHP/Laravel combination, including DB driver (MySQL/PostgreSQL/SQLite) for migrations and seeders.Key questions.
illuminate/*, database drivers) for v4.1.2?cities/communes table?Stack fit. Assumes a Laravel application on the current LTS path. v4.1.2 explicitly opens Laravel 12 compatibility, so teams on Laravel 11 or 12 can adopt without a version fork; teams on Laravel 10 or earlier should confirm the constraint floor before planning. The Larastan 3.0 and PHP 8.4 CI work is relevant to us mainly as a signal that the package composes cleanly under modern static analysis, which reduces the chance of runtime surprises in typed code paths.
Migration path. No migration is required on our side — this is a new adoption, not an upgrade. The practical sequence:
kossa/algerian-cities at ^4.1 in a feature branch and run composer update in isolation to inspect the resolved dependency graph.Compatibility. Confirm PHP version parity with our runtime, DB driver support for the shipped migrations, and whether the package assumes utf8mb4 collation for Arabic/French locality names. Check for global scopes, model bootstrapping, or service-provider registrations that could interact with existing tenancy or localization middleware.
Sequencing. Because this release is compatibility-only, the sensible order is: (a) validate data quality and licensing first, since that is the actual decision driver; (b) prove install/seed in a sandbox; (c) integrate behind our own repository/abstraction so the dataset is replaceable; (d) only then wire it into user-facing address flows. Adopt ^4.1 with a lockfile and treat minor upgrades as routine review items, not events.
Maintenance. Low ongoing code maintenance — it is reference data plus thin Eloquent models. The real maintenance burden is data currency: assign an owner to periodically check whether the shipped dataset matches current administrative reality and to re-seed when it does not. Patch releases like v4.1.2 require only a Composer bump and regression test run.
Support. Support surface is narrow: schema/seed issues, name encoding, and version compatibility. Internal support cost is dominated by onboarding developers to the data model, not by defects. External support is community-driven via GitHub; no commercial SLA, so plan for self-sufficiency.
Scaling. Read-heavy, small-cardinality reference data — ideal for caching. Load the full wilaya/commune set into application cache or a preloaded array at boot; do not join to it per-request at high volume without indexes on the lookup columns. Seed cost is a deployment-time concern, not a runtime one. No horizontal scaling implications.
Failure modes.
Ramp-up. A developer can be productive in well under a day: install, publish, seed, and query. The non-obvious work is the data-quality validation exercise and the decision of whether to consume the package directly or absorb its data into our own canonical geography model — that decision should be made explicitly in the design, not defaulted into. Recommend a short spike (1–2 days) covering seed benchmark, data spot-check against an official source, and Laravel 12 verification before committing to adoption.
How can I help you explore Laravel packages today?