dualmedia/symfony-request-dto-bundle
Adopt When:
Look Elsewhere If:
#[FindOneBy])."This bundle eliminates boilerplate in our API layer, reducing development time by 30% while improving data integrity. It automatically handles request parsing, validation, and OpenAPI docs—so our team can focus on business logic. For example, a new product endpoint that previously required 50 lines of manual validation now works with just a DTO class. The performance impact is negligible (cached metadata), and it integrates seamlessly with our existing Doctrine and API docs."
Key Outcomes:
*"This replaces repetitive request parsing (e.g., json_decode(), manual casting) with declarative DTOs. Key benefits:
if ($request->get('age') === '25'): Automatic type coercion (strings → ints, enums, dates).User objects directly from #[FindOneBy(['email' => '[email protected]'])].Migration Path:
Request parsing in one controller).Trade-offs:
#[Bag], #[FindBy]).Example Win:
Before: 40 lines of code to parse/validate a
CreateOrderDto. After: A single DTO class with type hints and constraints—zero manual parsing."*
How can I help you explore Laravel packages today?