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

Request Dto Bundle Laravel Package

nelexa/request-dto-bundle

Symfony bundle for mapping HTTP request data into typed DTOs with attribute-based configuration, validation, and automatic hydration. Reduce controller boilerplate by turning query, body, and route parameters into clean, testable request objects, with support for nested DTOs and Symfony Validator.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Input-layer architecture (build vs. buy): The package is evidence that "typed request objects resolved by attribute/framework convention" is a recognized pattern for keeping controllers thin — but it is a Symfony bundle, so for a Laravel codebase it informs the pattern, not the dependency. The real decision is whether to standardize typed request DTOs across controllers at all.
  • Framework-level standardization: Choosing one sanctioned way to get validated, typed input into controllers affects every API story on the roadmap. This package's approach (annotate a controller argument, let the framework construct and validate the DTO) is the same ergonomic bet Laravel makes with FormRequest and that spatie/laravel-data extends with casting and transformation.
  • API contract governance: Request DTOs are the natural single source of truth for validation rules, type coercion, and generated OpenAPI/docs. Adopting the pattern reduces drift between docs and runtime validation — a recurring source of client-facing bug tickets.
  • Testability and onboarding cost: Controllers that receive a hydrated object are trivially unit-testable without simulating full HTTP requests. This lowers the cost of new endpoints and shortens ramp-up for engineers joining the API team.
  • Roadmap gating for multi-client surfaces: If the roadmap includes a mobile app or partner API where payload shape and error semantics matter, formalizing request objects is a prerequisite; if the surface stays internal CRUD, it is over-engineering.
  • Security/input-sanitization posture: Centralizing deserialization and validation is a meaningful control for mass-assignment and malformed-payload risk — a compliance-relevant decision, not just an ergonomics one.

When to Consider This Package

Only as a reference implementation, and only if you are on Symfony. The package is a Symfony Bundle for controller action request-object support; it is not usable in a Laravel application without a port. Even on Symfony, adoption criteria should include:

  • Framework/PHP fit: Confirm it supports your Symfony major version and PHP runtime. Last release was 2021-12-08, which predates Symfony 7 and modern PHP 8.2/8.3 expectations — a hard blocker for a current stack.
  • Maintenance and blast radius: 9 stars, 0 dependents, single maintainer, no releases in ~4 years. Supply-chain and long-term-support review would almost certainly reject this as a production dependency. There is no community to absorb bugs and no evidence of security patching.
  • Scope match: Adopt only if you specifically want attribute-driven request-object resolution and are willing to vendor/fork it. If you just want validated input objects, the framework-native primitives already do this.
  • Look elsewhere if: you are on Laravel (use FormRequest for validation-shaped input, or spatie/laravel-data / a small internal DTO + Validator pipeline when you need casting, transformation, and OpenAPI generation); you need active maintenance, security response, or a support contract; or you are greenfield and cannot justify carrying a dormant third-party package.

Verdict: do not adopt as a dependency. Mine it for design ideas, and satisfy the need natively.

How to Pitch It (Stakeholders)

For executives: The pattern — turning raw HTTP input into validated, typed objects before it reaches business logic — is worth adopting because it cuts a whole class of runtime bugs and makes every new endpoint cheaper and safer to ship. The specific package is not the vehicle: it is a Symfony-only library with 9 stars, zero dependents, one maintainer, and no release since December 2021. That is unacceptable supply-chain risk for production, and it does not run on our stack. Recommendation: adopt the pattern, build or buy a maintained equivalent, spend days not months.

For engineering leadership: We would be reverse-engineering a ~200-line capability that our framework already provides in primitive form. The defensible options are (a) framework-native request validation plus a thin internal DTO layer we own and test, or (b) a maintained ecosystem package with active releases and a real user base. Either way we get typed input, centralized validation, generated API contracts, and controller testability — with an owner and a patching path.

For the team: Treat nelexa/request-dto-bundle as documentation of a good idea, not code to install. If someone proposes it in a PR, the answer is no on framework compatibility and no on maintenance; propose the internal equivalent instead.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager