glifery/entity-hidden-type-bundle
Symfony bundle that provides a hidden form type for Doctrine entities, letting forms submit an entity ID and resolve it back to the entity on submit—useful for compact forms and relationship fields without exposing full entity choice widgets.
Architecture fit — unchanged: poor, with a stack mismatch up front. glifery/entity-hidden-type-bundle remains a Symfony2 bundle, not a Laravel package. 2.1.0 adds one-to-many support to the Form type and data transformer; it does not add a Laravel integration path. There is still no Form component, bundle kernel, or Doctrine entity manager in a standard Laravel stack, so the package's core mechanism has no host to attach to. In Laravel the equivalent capability remains a hidden Blade input containing the key (or a delimited set of keys), plus route model binding, a FormRequest rule (exists:table,id / array validation with distinct), and an explicit findOrFail with a policy check — roughly 20–40 lines of first-party code for the single case, perhaps 60 for the collection case.
Integration feasibility — very low, slightly worse for the new feature. Pulling this in would still mean adding symfony/form, symfony/http-kernel, symfony/dependency-injection, and Doctrine ORM to a Laravel application purely to obtain an ID→entity transformer. The 2.1.0 release notes mention only the one-to-many PR; there is no stated change to PHP or Symfony constraints and no changelog entry indicating a modernization. Absent evidence to the contrary, assume the same 2017-era constraint floor (PHP 5.x/7.x, Symfony 2.3–2.8) and the same use of APIs removed in Symfony 3/4 (setDefaultOptions, getName). A minor version bump with a feature PR is the least likely release shape to carry a compatibility refresh.
Technical risk — high, with a new dimension from collection hydration. Still a single-maintainer, low-adoption package; 2.1.0 is a community-contributed feature merged from a third-party fork (tkuska), which is a positive maintenance signal but not a governance or support commitment — there is still no CI signal, security disclosure path, or published support policy visible in the release data. The IDOR surface is unchanged in kind and broader in scope: with one-to-many, the client-supplied payload now carries a set of identifiers, so the resolver must authorize every element, not just one. A partial-authorization bug (validating the first ID, trusting the rest) is a realistic and quiet failure. Collection support also introduces serialization ambiguity — delimiter, JSON array, or repeated field — which the assessment cannot resolve from the release note alone and which materially affects both validation and tamper resistance.
Key questions.
Given a score of 0.53 and zero dependents, the opportunity signal (4.89) still reflects whitespace in this capability, not viability of this package as the vehicle. The 2.1.0 feature narrows the capability gap slightly for genuine Symfony 2.x shops; it does not move the Laravel verdict.
Stack fit — none for Laravel, unchanged. Recommend rejecting the dependency outright. If the team is maintaining a legacy Symfony 2.x application, the bundle fits its era and installs cleanly, and 2.1.0 is the release to pin if one-to-many hidden references are needed; that is the only scenario where adoption is defensible, and it should be time-boxed to the life of that application.
Migration path — reimplement, do not port. The reusable asset is the transformer logic, not the bundle. In Laravel: a hidden input carrying the key (or a JSON/CSV array of keys), validated with exists:table,id or array + distinct + per-element exists, resolved via route model binding or an explicit scoped query, followed by a policy/authorize() gate before association — applied per element. In Symfony 4+: a ~30-line (single) / ~50-line (collection) custom AbstractType wrapping HiddenType with an IdToEntityTransformer built on EntityManagerInterface, registered as a service. This removes two framework-level dependencies and restores testability.
Compatibility. Assume PHP ≤7.1 and Symfony ≤2.8. Treat any claim of PHP 8 or Symfony 5/6 support as unverified — the 2.1.0 notes make no such claim. Do not attempt to satisfy its constraints in a modern composer.json; conflicts will surface as unresolvable graphs rather than clean errors. Verify the 2.1.0 tag's composer.json directly rather than inferring from the release note.
Sequencing.
2.1.0, and wrap it behind an internal type so call sites are insulated from the eventual replacement.Maintenance — you own it on day one, with a marginally better outlook. No releases in eight years prior to 2.1.0, no issue triage cadence established, no patch guarantee. The 2.1.0 merge from an external fork is evidence someone besides the original maintainer touched it; treat that as a one-off contribution, not a succession plan. A fork still means you inherit Symfony deprecation debt with no upstream to rebase onto. Budget the fork as permanently yours or skip it.
Support. Documentation is a README; 2.1.0's new capability arrives with a PR link rather than documented usage, so the collection behavior — payload format, ordering, duplicate handling — must be read out of the source. There is no community to escalate to. Onboarding any new engineer requires them to learn an unfamiliar Symfony Form abstraction to understand behavior that a native Laravel hidden input would make self-evident.
Scaling — new feature amplifies the existing inefficiency. Runtime cost was one entity lookup per submitted hidden field; with one-to-many support it is one lookup per element in each collection, still unmemoized and still unbatched. A form with several hidden entity fields, one of which carries twenty related IDs, produces twenty-plus sequential find()/findBy() calls on submit. Low absolute cost per request, but a measurable, avoidable N+1 that scales linearly with user-controlled payload size — which is also a cheap amplification vector for unauthenticated or low-privilege submissions.
Failure modes.
TransformationFailedException; whether that becomes a clean validation message or a 500 depends on error bubbling configuration — verify rather than assume. Unchanged.Ramp-up. For an experienced Symfony 2 developer, roughly an hour for the single case, roughly half a day to add the collection case including reading the transformer source for format semantics. For a Laravel team, the cost of learning Symfony Form internals plus Doctrine hydration exceeds the cost of writing the equivalent logic directly — which remains the decisive argument against adoption regardless of the package's other merits.
How can I help you explore Laravel packages today?