sensiolabs-de/rich-model-forms-bundle
A Symfony bundle for building forms around rich domain models and value objects. It supplies form types, data mappers, and transformers so immutable objects, DTOs, and constructor-based models can be bound and validated without public setters, keeping form and domain layers cleanly separated.
Architecture fit
symfony/form by supplying alternative DataMapperInterface implementations so that forms can bind directly to rich domain models (private setters, constructor-required invariants, value objects) instead of anemic DTOs or public-property entities.PropertyPathMapper assumes writable properties, which pushes teams toward anemic models purely to satisfy the form layer. This bundle lets the domain model stay encapsulated while forms still map to it.FormRequest, Validator) operates on arrays rather than object graphs. Architectural fit for a Laravel stack is effectively zero.Integration feasibility
Technical risk
Key questions
Stack fit
symfony/form as a standalone library, wiring your own service container bindings (since the bundle's DI extension is Symfony-specific), and bypassing Laravel's validation and Blade form helpers entirely. That is a rewrite of the request-to-model path, not an integration.symfony/form is already present for other reasons.Migration path
DataMapperInterface implementation per mapping shape (constructor-based hydration, collection mapping, value-object coercion). This is the preferred path — it removes the abandoned dependency entirely and produces code your team understands.Compatibility
composer why / composer depends before and after.symfony/form do not conflict with the application's pinned framework version.Sequencing
Maintenance
Support
Scaling
Failure modes
Ramp-up
DataMapperInterface will onboard in hours; the concept is small and the code is readable.How can I help you explore Laravel packages today?