prezent/doctrine-translatable
Doctrine ORM extension that makes entities translatable: implement a simple interface, attach a listener, and store per-locale translations in a companion table. Fetch localized field values automatically based on the active locale, with fallback support for missing translations.
Framing correction. Despite the request framing this as a "Laravel/PHP package," prezent/doctrine-translatable is a Doctrine ORM behavior extension, not a Laravel/Eloquent package. It has no service provider, no config publish tag, and no Eloquent trait. Any TPM assessment must start from that stack mismatch, because it determines whether this is a drop-in, a wrapper project, or a non-starter.
Architecture fit. Poor-to-moderate for a standard Laravel application. Laravel's default data layer is Eloquent (Active Record); Doctrine is a Data Mapper with a unit of work, DQL, and its own hydration model. Bolting Doctrine into Laravel is supported (e.g., laravel-doctrine/orm) but creates a split ORM estate, dual migration tooling, and two mental models for the team. If the target application is already Doctrine-based — a Symfony service, a Laravel app with an existing Doctrine layer, or a legacy PHP system — the fit improves to reasonable.
Integration feasibility. Medium. Expect: Composer install, entity-level mapping (annotation vs. attribute syntax matters for PHP 8), registration of the translation listener/event subscriber, a locale resolver wired to Laravel's App::getLocale(), and translation entity generation or hand-mapping. All of that is glue the TPM should budget as custom work, not package work.
Technical risk. High, on three independent axes:
Key questions to answer before committing:
Verdict. Treat as do not adopt by default. The strongest reason to use it is "we are already on Doctrine and need a translatable behavior now." The strongest reason to reject it is "we are an Eloquent shop," which is the likely case. Mature alternatives — gedmo/doctrine-extensions (Translatable) or knplabs/doctrine-behaviors for Doctrine; spatie/laravel-translatable for Eloquent — carry orders of magnitude more adoption and should be the default comparison set.
Stack fit.
| Target stack | Fit | Notes |
|---|---|---|
| Laravel + Eloquent (default) | ✗ | Wrong ORM; do not integrate |
Laravel + Doctrine (laravel-doctrine/orm) |
~ | Workable, but adds a second data layer |
| Symfony + Doctrine | ✓ | Native home; least friction |
| Legacy PHP + Doctrine 2 | ✓ | Natural fit if versions align |
Migration path. Do not migrate toward this package. If the application is Eloquent-first, the correct path is a Laravel-native translatable package; introducing Doctrine solely to use this behavior inverts the cost/benefit. If the application is Doctrine-first, the migration path is within Doctrine: evaluate gedmo/doctrine-extensions first, and use prezent/doctrine-translatable only if it demonstrably solves a gap Gedmo does not.
Compatibility gate. Pin and verify before any code: PHP version, Doctrine ORM 2.14+/3.x, DBAL 3/4, mapping driver (attributes vs. annotations), and the Laravel or Symfony major. If the package's composer.json does not declare these constraints, assume breakage and budget a fork.
Sequencing.
The internal-interface isolation step is the single most important sequencing decision: it converts an unmaintained dependency from an architectural lock-in into a replaceable detail.
Maintenance. This is the dominant cost. A 26-star package with an unverifiable repository has no realistic expectation of upstream patches for PHP or Doctrine upgrades. Plan to vendor the source into the monorepo (with the MIT license preserved) and own it. Budget roughly 5–10% of one engineer's capacity per quarter for dependency upkeep, spiking around framework major upgrades.
Support. MIT, community-only, no SLA, no security advisory channel. Any production incident traces to our own on-call. This must be accepted explicitly by the engineering owner, not silently inherited.
Scaling. The translatable pattern typically multiplies rows per entity per locale. Watch for:
Mitigations: partial hydration / DQL NEW projections, per-locale caching keyed by entity + locale + version, and composite indexes on (locale, foreign_key).
Failure modes to design against.
Ramp-up. Expect a real learning curve if the team is Eloquent-native: Doctrine's unit of work, DQL, entity lifecycle events, and mapping drivers are a distinct skill set. Realistic estimate: 2–3 sprints before a mid-level engineer is productive and one senior engineer as the named owner. Documentation for a package this size will be thin or absent — the ramp-up cost lands on reading the source, which is only feasible if the repository is actually reachable.
Bottom line for the roadmap. Green-light only for Doctrine-based systems, only after provenance is verified, only behind an internal abstraction, and only with a named maintainer. For a Laravel/Eloquent codebase, reject and route the i18n requirement to a mainstream Laravel translatable package.
How can I help you explore Laravel packages today?