qbbr/entity-hidden-type-bundle
Symfony bundle providing a hidden entity form type for Doctrine entities. Embed entity references as hidden fields and transform submitted IDs back into entities, making it easy to preserve related objects in forms without exposing a visible selector or extra UI.
Order, Company, Post) must persist across steps. The conventional EntityType renders a <select> of every row and re-queries the whole table on each step; a hidden entity type carries the reference as an ID instead. That is a performance and UX decision, not a feature.company_id without exposing a picker.EntityHiddenType with tests, rather than per-feature one-offs.Consider only if all of the following hold:
Look elsewhere (or build in-house) when:
HiddenType + a DataTransformer (entity → ID on submit, ID → entity on render), roughly 40 lines. There is no reason to carry a legacy bundle across a major upgrade.EntityType with a disabled/read-only choice, or a plain hidden field plus server-side hydration, is clearer and better supported.Bottom line: treat this repository as documentation of a pattern. Do not add it to a dependency manifest.
For executives (one paragraph): We found a small open-source component that solves a narrow, recurring form problem: passing a database record from one screen to the next without forcing the user to re-select it from a long dropdown. It is a Symfony 2 artifact with zero adopters, last relevant years ago, and the framework version it targets no longer receives security fixes. The recommendation is not to adopt it. The capability it represents is worth roughly one engineering day to build and own internally, and doing so removes a dependency we would otherwise have to maintain indefinitely. The more important finding is organizational: this component only exists in our world if we still run Symfony 2, which should sharpen the priority of the framework upgrade conversation.
For engineering (talking points):
FormType whose getParent() returns HiddenType::class, a model/view transformer mapping entity ↔ identifier, and a PRE_BIND/POST_SUBMIT listener to hydrate the entity. Modern Symfony implements this with HiddenType + DataTransformer in about 40 lines.EntityType choice query on high-cardinality relations — worth measuring, not assuming. If the dropdown has 12 options, use EntityType and move on.How can I help you explore Laravel packages today?