elcodi/language-bundle
Language Bundle is part of the Elcodi e-commerce suite for Symfony, providing language and locale management for multilingual stores. Read-only package; use the main elcodi/elcodi repo for issues and pull requests.
Architecture fit. elcodi/language-bundle is a Symfony bundle, not a Laravel package. It is a thin split of the Elcodi monorepo that ships a Language domain entity (Doctrine-mapped), language/locale resolution services, and Symfony DI wiring (Bundle class, extension, service definitions, config tree). Laravel and Symfony share PSR-11-style containers in spirit, but Laravel's service provider + config publish model, middleware pipeline, and Eloquent ORM do not consume Symfony bundle bootstrapping. There is no ServiceProvider, no facade, no Laravel config file, and no Laravel middleware. Architecture fit for a Laravel application is therefore poor-to-nonexistent; the realistic path is to treat this repo as reference material for locale negotiation semantics rather than a dependency.
Integration feasibility. Feasible only via porting, not via Composer. A port would mean re-implementing the language entity/table as an Eloquent model, re-expressing the language-resolution services as container bindings, and replacing Symfony config/DI with Laravel config plus a service provider. That is a multi-day effort for a component whose scope is modest and whose Laravel-native equivalents (e.g. mcamara/laravel-localization, astrotomic/laravel-translatable, spatie/laravel-translation-loader) are maintained and Laravel-version-tested. Estimated port effort: 5–10 engineer-days including tests, before counting future maintenance.
Technical risk. High.
composer.json before any assumption, but expect resolution failure rather than clean install.Key questions.
Stack fit. Weak. Symfony bundles assume FrameworkBundle: kernel boot, compiler passes, YAML/XML service definitions, event dispatcher contracts. Laravel provides analogous primitives but no compatibility shim. The bundle also assumes Doctrine ORM for its entity, competing with Eloquent. The only genuinely reusable assets are concepts and, potentially, small pure-PHP service classes for locale matching—and even those should be audited for Symfony interface type-hints.
Migration path. Three viable options, in recommended order:
Direct composer require elcodi/language-bundle into a Laravel app is not a supported option and should be rejected at the architecture review gate.
Compatibility. Expect hard blockers: PHP version floor, Symfony 2.x/3.x component constraints, Doctrine ORM 2.x constraints, and PSR version conflicts. There is no Laravel 8/9/10/11 support and no PHP 8 support. Any assumption that "it's PHP, so it'll run" should be resolved by a timeboxed spike that attempts install in a throwaway Laravel skeleton and captures the exact composer why-not output. Document that result—it is the fastest, cheapest evidence for the decision.
Sequencing.
ServiceProvider, add config publishing, replace Symfony event hooks with Laravel middleware, and add integration tests against the supported Laravel versions.App::setLocale.Maintenance. This is the dominant cost. Upstream will never merge a fix, so any fork becomes 100% internal. Every Laravel or PHP major upgrade requires us to re-validate code we inherited from 2016. Every CVE scan touching Symfony or Doctrine transitive packages becomes manual triage with no upstream patch path. In practice, the "free" MIT license transfers all maintenance liability to us—this is the central TPM trade-off and it is unfavorable for a component this small.
Support. Effectively none. The README points to Gitter, StackOverflow, Twitter, and a docs site for a project that has since gone EOL. Expect dead links and no answers. Internal engineers become the sole subject-matter experts, which is an unpriced knowledge concentration risk—if the one engineer who does the port leaves, the package becomes opaque.
Scaling. Functional scaling is a non-issue: language and locale resolution are low-cardinality lookups that cache well (per-request resolution, in-memory or Redis-cached language lists). Do not expect throughput problems. The real scaling concern is organizational: a bespoke forked locale layer diverges from Laravel idiom, raising onboarding cost for every engineer who touches localization, and adds a non-standard surface to audits.
Failure modes.
Ramp-up. For a Laravel team, initial velocity is negative. Engineers must learn Symfony bundle conventions—extension classes, compiler passes, service definition formats—to understand code they are about to delete. Realistically 2–3 days of context-building before productive porting, on top of the port itself. Compare to a maintained Laravel package with straightforward docs where a mid-level engineer integrates in half a day. Recommendation: reject adoption of elcodi/language-bundle for a Laravel codebase; treat it as an archived reference implementation, run the one-day requirements capture and compatibility spike to formalize the decision, and proceed with maintained Laravel-native localization tooling unless the spike uncovers a hard, non-negotiable compatibility requirement with existing Elcodi data.
How can I help you explore Laravel packages today?