Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Formtranslationchoice Bundle Laravel Package

liip/formtranslationchoice-bundle

LiipFormTranslationChoiceBundle adds a Symfony form choice type that translates option labels through the Symfony Translator, letting select, radio, and checkbox choices display localized text without manual label mapping.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Effectively zero. liip/formtranslationchoice-bundle is a Symfony 2 bundle: it ships a Bundle subclass, DI extension/service definitions, and depends on the full-stack Symfony Form and Validator components as wired by AppKernel. Laravel has no bundle concept, no kernel-registered service container extension, and does not use the Symfony Form component — it uses Illuminate\Validation and Blade-based form markup.
  • The only shared surface is the Symfony Translation component, which Laravel does not use either (Laravel has its own Illuminate\Translation / __() / trans() helpers). There is no adapter seam here; the package's value proposition is entirely expressed in APIs Laravel never invokes.
  • The underlying problem it solves — render choice labels from a translation domain and validate submitted values against that same domain — is a ~50–150 line concern that Laravel solves idiomatically with __('domain.key'), Rule::in(), FormRequest::attributes(), and enum-backed selects.

Integration feasibility

  • Low to the point of non-viability. Adopting it would require pulling in symfony/form, symfony/validator, and symfony/framework-bundle-adjacent wiring into a Laravel app, then building a bridge from Laravel's request/validation lifecycle into Symfony's Form event model. That is net-new infrastructure to obtain a feature Laravel already expresses in one line.
  • The code is Symfony 2-era: expect OptionsResolverInterface, setDefaultOptions(), AbstractType::getName(), and other signatures removed in Symfony 3/4. Modern PHP 8 compatibility is unlikely without a fork.

Technical risk

  • High. The repository is archived, has 10 stars, 0 dependents, and a composite score of ~0.24. Those are strong signals of an abandoned reference implementation, not a maintained dependency.
  • Symfony 2 reached end-of-life in 2016–2017; any transitive Symfony requirement would conflict with Laravel's own symfony/* constraints (HttpFoundation, Console, Process, VarDumper), creating Composer resolution deadlocks or forcing pinned, unpatched component versions.
  • No security response path. No CI, no stated test matrix, no maintainer. Archived status means no fixes will ever land.
  • License (MIT) is fine; the risk is lifecycle, not legal.

Key questions

  1. Is the actual requirement "translate choice labels and validate against the same domain" — or just "translate select options"? The latter is trivially native.
  2. Does the target application use Symfony Form at all? If not, the package has no insertion point.
  3. Are there regulatory or audit constraints requiring a supported dependency with an active maintainer? If so, this fails immediately.
  4. How many locales and domains are in play, and is there a need for locale fallback and missing-key detection? That drives whether a small internal abstraction is warranted.

Integration Approach

Stack fit

  • Poor. Laravel ≠ Symfony full-stack. The package targets a framework paradigm (bundles + DI extensions + Form types) that Laravel deliberately does not implement.
  • Correct stack-fit answer: do not install. Reimplement the behavior as a Laravel-native concern.

Migration path

  • Treat the repository as a design reference, not a dependency. Read the constraint's logic (resolve domain → translate key → compare against submitted value) and port it.
  • Recommended native implementation:
    • A backed Enum or config array of choice values, with labels resolved via __('forms.status.'.$value).
    • A FormRequest with Rule::in(array_keys($choices)) and attributes() returning translated field labels.
    • A Blade partial / <x-select> component that loops the same source of truth so labels and validation can never drift.
    • A feature test asserting both the rendered labels and the rejection of out-of-domain values, per locale.
  • If (and only if) there is a hard requirement to reuse the exact constraint semantics, isolate a port in app/Support/ behind an interface — do not vendor the bundle.

Compatibility

  • Verify nothing pulls symfony/form or symfony/validator into the root composer.json; Laravel's constrained symfony/* set makes this the most likely immediate breakage.
  • PHP 8.x: assume incompatible without a fork; do not budget for the fork.
  • Laravel version: no stated support for any Laravel release, because the concept does not exist there.

Sequencing

  1. Confirm the requirement is label translation + domain-scoped validation (1 day of discovery).
  2. Build the native select component + validation rule + single source of truth (1–3 days).
  3. Add locale-matrix tests including missing-key behavior.
  4. Explicitly document the decision to not adopt the bundle, so the question does not resurface.

Operational Impact

Maintenance

  • As a dependency: unbounded and negative — archived code, no upstream fixes, so every future PHP/Laravel upgrade becomes your team's problem. Total cost of ownership is worse than owning 100 lines of first-party code.
  • As a reimplementation: minimal, testable, fully within existing Laravel upgrade cadence.

Support

  • None. No maintainer, no issue triage, no security advisories. Internal escalation would resolve to "we wrote a shim we now own," which is strictly worse than writing the feature directly.

Scaling

  • The package's logic is O(1) per choice and non-scaling-relevant. The real scaling concern is translation lookup and caching, which Laravel's translation loader/cache already handles. No performance argument favors the bundle.
  • Locale count and domain count are the meaningful dimensions; both are better managed in a native source of truth than across a Symfony/symfony-translation boundary.

Failure modes

  • Composer conflict on symfony/* versions — likely, blocking.
  • Missing translation key leaking a raw key (e.g. forms.status.active) into the UI; the bundle's own behavior here is unverified and untested.
  • Label/validation drift if the choice source and the validation rule are defined separately — the primary correctness risk in the native build, mitigated by a single source of truth + tests.
  • Locale fallback gaps producing inconsistent labels across locales without erroring.
  • Silent abandonment: an engineer installs it, it half-works under a compatibility shim, and the failure surfaces in production i18n rather than at build time.

Ramp-up

  • Learning the bundle: low value, high friction — Symfony 2 bundle conventions are unfamiliar to most Laravel engineers and the mental model does not transfer.
  • The native equivalent is understandable by any Laravel developer in under an hour and requires no new framework knowledge.
  • Recommendation: reject adoption; implement natively. The package is a well-intentioned reference for a solved problem, not a viable dependency for a Laravel application.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator