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

Entity Hidden Type Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Framework-fit flag first: this is a Symfony 2.x bundle (Doctrine ORM + Symfony Form component), not a Laravel package. 2.1.0 does not change that — the release is a feature addition inside the same EOL target. If our stack is Laravel it is not installable; the decision it informs is "is this pattern worth copying?", not "do we add this dependency?"
  • Build vs buy: the capability is a DataTransformer (submitted ID ↔ entity via EntityManager) plus a form type that renders hidden. 2.1.0 adds one-to-many support, which means handling a collection of submitted IDs → a collection of entities rather than a single one. That nudges the in-house estimate from ~50–150 LOC to roughly 100–250 LOC plus tests (collection transformer, empty/missing-ID handling, array-vs-scalar input normalization). Still "build in-house"; still copy-the-pattern, not buy.
  • Feature enablement: unchanged core value — multi-step wizards, admin edit screens, nested-resource flows carrying an entity reference (parent Order, Tenant, Post) without a dropdown the user re-picks. The one-to-many addition widens the applicable surface to bulk/collection bindings: "add these selected items to this order", tag/member assignment panels, import-mapping screens where a set of referenced records is bound silently. Marginal, not transformative — most such flows want a real multi-select or autocomplete for discoverability anyway.
  • Roadmap: still no. 18 stars, 0 dependents, single maintainer, no release between July 2017 and 2.1.0. A single feature PR after eight years is a sign of life, not a maintenance commitment — and it conspicuously does not add Symfony 3/4/5+ or PHP 7.4/8 support, which is what would actually change the calculus for us. At best it remains legacy archaeology with one more capability.
  • Use cases worth reimplementing internally: nested resource creation (comment on a post), back-office admin forms, bulk "act on selected rows" flows, import/mapping tools, and now collection-binding screens. Low complexity, high convenience.
  • Anti-pattern to rule out in the PRD: never let a hidden field drive authorization. This applies with more force to 2.1.0's one-to-many path — a submitted array of IDs multiplies the attack surface (ID injection, cross-tenant references, mass-assignment of relations). Every ID in the collection must be re-loaded and ownership/scoping enforced server-side, and the collection size should be bounded by validation. Treating hidden inputs as a security boundary is a product risk, not a shortcut.
  • Tech-debt signal: a codebase depending on this is still a proxy datapoint that the app is pinned to a dead Symfony branch — useful input when sizing a modernization initiative. If a team is actively pulling 2.1.0 to get one-to-many behavior, that is a slightly stronger signal they are investing in the legacy branch rather than migrating off it.

When to Consider This Package

Consider it (cautiously) only when:

  • The app is a legacy Symfony 2.x / Doctrine codebase with existing Form component usage and no budget to port.
  • The need is purely plumbing — round-tripping an ID, or (new in 2.1.0) a collection of IDs — and the form already validates entity existence and access on submit.
  • You can vendor and pin the code (2.1.0) and accept full ownership; verify who actually owns the release before relying on it — the 2.1.0 source link points at a fork, so the maintained lineage may not be the repo we were tracking.
  • You need one-to-many binding and are willing to accept that the package still provides no version bump of framework compatibility to go with it.

Look elsewhere, or build in-house, when:

  • Symfony 4/5/6+ — this is standard DataTransformer + EntityType territory, including multiple => true for collections; core supports it without a third-party bundle.
  • Laravel or any non-Symfony stack — a small custom validation rule (plus array validation for collections) and a form request gets you there; do not chase a Symfony bridge.
  • Security-sensitive flows — the package provides no authorization semantics whatsoever, single or one-to-many.
  • You need maintenance guarantees — 2.1.0 is one data point after an eight-year gap; still no community safety net and likely PHP 8 incompatibility without patches.
  • CI, dependency scanning, or advisory tooling matters — abandoned packages become noise or blockers in those pipelines.

How to Pitch It (Stakeholders)

Executives: A small open-source add-on for passing entity references through web forms shipped its first release since 2017. The new feature (one-to-many relations) is a narrow extension of an already narrow tool, and it does not address the blockers we identified: end-of-life framework target, single maintainer, no downstream users. Recommendation is unchanged: do not adopt it as a dependency. The capability — now including the collection case — is still a small piece of code we can own and support ourselves. Roadmap impact: none — no cost, no license, no new vendor risk. If it is already inside our code, continue to treat it as a modernization signal rather than a feature.

Engineering: Same Symfony2 form type plus Doctrine data transformer, now extended to bind a submitted array of IDs to a relation collection. Straightforward to replicate, or to replace with EntityType (multiple => true) rendered hidden (Symfony) or a typed DTO plus array validation, existence checks, and a policy check per ID (Laravel). Two non-negotiables if we replicate: (1) never trust submitted IDs — verify existence and authorization server-side for every element and bound the collection size; (2) hidden is UX, not security. Estimated effort: half a day to a day including tests for the collection path. Net: use it as a reference implementation, not a dependency.

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.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus