pms-nz/object-translation-bundle
Object Translation Bundle is a PHP package for attaching locale-specific translations to objects, making it easier to serve localized content without duplicating model logic. It provides straightforward storage and retrieval of translated object values for multilingual applications.
Architecture fit. The package provides per-locale translated fields attached to a domain object — a reusable "translation storage" concern rather than an application framework. v1.0.3 loosens the inheritance contract: a translation class no longer has to extend AbstractTranslation. That moves the package from an inheritance-based extension toward a composition/duck-typing contract. For an architecture where domain entities are owned by product teams and vendor base classes are kept out of the model layer, this is directionally correct and lowers coupling.
Caveat: the artifact is named object-translation-bundle, which implies Symfony Bundle conventions (DI extension, Resources/config, Doctrine event wiring), while intake classifies it as a Laravel/PHP package. Framework target must be confirmed before any architectural commitment — this is the single largest unknown in the evaluation.
Integration feasibility. Improved by this release. Teams can reuse existing translation entities and tables instead of re-parenting them, which removes a refactor step from the adoption path. Remaining work is unchanged: translation schema, locale resolution/fallback policy, and a mapping or configuration layer binding domain objects to their translation classes. Net effort for a greenfield pilot is small; for brownfield it shifts from "refactor your model" to "declare conformance," which is materially cheaper and lower-risk.
Technical risk.
AbstractTranslation guaranteed methods such as translatable accessors and locale handling. With that requirement removed, any method the library calls on a translation class is only guaranteed by convention unless an interface replaces it. Failures move from install time to first-translate runtime — a latent-defect class rather than a loud one.composer update. Existing installs extending AbstractTranslation should continue to work (inheritance became optional, not forbidden) — verify.pms-nz) with no visible support commitment. Low bus factor.Key questions.
1.0.2 → 1.0.3 a drop-in for current installs, and is any action required for those already extending AbstractTranslation?Stack fit. PHP, with the framework fit unresolved. If it is a true Symfony bundle, integration is bundle registration plus Doctrine mapping and is low-friction. Consuming it inside Laravel would require a service provider and Eloquent-compatible mapping — plausible but not free, and not something to assume from the intake label. Confirm before sizing.
Migration path. Greenfield: install, define a translation entity satisfying the (now non-inherited) contract, register configuration, run schema migration. Brownfield: the removed inheritance requirement means existing translation tables map as-is — no data migration, only class-declaration and contract-conformance changes. This is the release's main practical win.
Compatibility. Treat as a patch upgrade: pin ^1.0, upgrade in a branch, and diff behavior on one entity before wider rollout. The risk is not API breakage but a change in what "valid" means at install time, so validation must be exercised explicitly in CI rather than trusted.
Sequencing.
Maintenance. Small, low-churn dependency, but responsibility for contract conformance has shifted to us. Budget a test, not just configuration — that is the durable cost of this release.
Support. No vendor SLA; single upstream maintainer. Requires a named internal owner. Mitigating factor: the translation schema and data are ours, so the library is the thin, replaceable layer — an exit path exists without data loss.
Scaling. Watch the query pattern rather than the code: per-object translation lookups invite N+1. Confirm eager-loading or join support, index on (object_id, locale), and cache translated fields per request and locale. Scaling cost sits in the ORM layer, not in this package.
Failure modes.
Ramp-up. Low for a PHP developer already fluent in the ORM: roughly half a day to a working translation on one entity, about a week to production-grade including fallbacks, indexing, and conformance tests. v1.0.3 reduces ramp-up specifically for brownfield teams by eliminating entity re-parenting.
Recommendation. Adopt for a bounded pilot; do not standardize yet. The release is a net positive — it removes the highest-friction integration constraint — but gating items are the framework-target question and the contradictory changelog line describing whether the requirement was removed or merely relocated.
How can I help you explore Laravel packages today?