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

Dto Param Converter Bundle Laravel Package

pfilsx/dto-param-converter-bundle

A Symfony bundle that converts request parameters into typed DTOs via a param converter, keeping controllers clean and making input handling more explicit, reusable, and testable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Symfony bundle, not a Laravel package — the premise matters. It works by registering a param converter so controllers can declare a DTO as a typed argument and have it hydrated from the request. That is a framework extension point; it plugs into Symfony's argument resolution and DI container. Fit is therefore strong inside Symfony 5/6 applications that already lean on controller argument resolution and Symfony Validator. Outside that, fit is near zero: Laravel has no param converter concept, so "integration" there means reimplementing the pattern rather than installing the dependency. Any assessment assuming a Laravel stack should treat this as a design reference, not a candidate dependency.

Integration feasibility. MIT licensing means vendoring or forking is unencumbered. Technically it is a small install-and-register bundle: Composer require, enable the bundle, annotate or attribute controller arguments. The real feasibility question is not mechanical but evidentiary. Seven stars, zero dependents, and a last release of 2023-03-27 mean there is no observable production usage. Zero dependents is the strongest signal here — it says nobody in the ecosystem has built on this, so there is no field-tested path, no incidental bug reports, and no compatibility pressure pushing releases forward.

Technical risk. High relative to the value delivered. The main exposures: (1) effective abandonment — no security patch pipeline and no release cadence; (2) version lock — 2023-era constraints likely mean no Symfony 7 or newer PHP guarantees, which will collide with any upgrade roadmap; (3) opaque failure semantics — conversion errors surface as exceptions, and how those map to HTTP status codes (400 vs 422) is not a standardized contract you can rely on; (4) over-posting — auto-hydrating a DTO from a raw payload is a mass-assignment surface unless binding is constructor-based and explicit; (5) bus factor of one. The scores reinforce this: 0.065 overall and opportunity 24.27 both say the capability is thin — the whole mechanism is a few dozen lines of glue, so the package is trading maintenance risk for very little saved effort.

Key questions.

  • Which Symfony and PHP version ranges are actually supported, and is Symfony 7 in scope?
  • Does conversion route through Symfony Validator, and are violations surfaced consistently as 422s?
  • Are nested DTOs, collections, and query-string or route-param binding supported, or only flat JSON bodies?
  • Is hydration constructor-based (safer, explicit) or reflection/property-set (over-posting risk)?
  • What happens on malformed or non-JSON payloads — client-safe error or unhandled exception?
  • What is our appetite for owning a fork, and who is the named owner?

Integration Approach

Stack fit. Adopt inside a Symfony service only. In a Laravel or framework-agnostic PHP codebase, do not take this on as a dependency — extract the pattern, not the code. For Laravel the functional equivalent is a FormRequest feeding a typed DTO, or spatie/laravel-data if a mature dependency is preferred.

Migration path. Introduce an application-level seam first: a RequestDataResolver (or similar) interface that your controllers and handlers depend on. Implement that interface once — using this bundle in a Symfony app, or a FormRequest-to-DTO mapper in Laravel. Controllers must never reference the bundle's concrete attributes or classes directly; keep those inside a single adapter file. That way, if the package stalls or blocks an upgrade, you replace one adapter rather than auditing every controller.

Compatibility. Validate on a throwaway branch before committing: resolve against your actual Symfony/PHP matrix, then run the full suite plus one integration test per binding type — body, query, route parameter, nested DTO, and a deliberate type-mismatch case to capture the failure response. Expect 2023 constraints to fight modern Symfony; if Composer resolution fails, plan for a fork with widened constraints or a replace entry rather than pinning the whole app backwards.

Sequencing.

  1. Spike, one to two days, on a single endpoint to confirm version resolution and error behavior.
  2. Define the seam and write contract tests around the expected request-to-DTO behavior.
  3. Fork or vendor only if the spike proves the package works but is unmaintained.
  4. Adopt in one bounded context — a single API surface — not fleet-wide.
  5. Measure, then decide on broader rollout or revert.

Do not begin by converting all controllers. DTO adoption touches serialization, validation, and OpenAPI/schema generation simultaneously, and a broad first swing makes rollback expensive.

Operational Impact

Maintenance. Treat this as effectively unmaintained. Budget for a team-owned fork with a named maintainer and a scheduled re-evaluation — if upstream is dead, the fork becomes the product. Pin the version, commit the lockfile, and disable automated dependency bumps for this package specifically.

Support. There is no community to lean on: no dependents, no issue velocity, no downstream bug reports to mine. Internal documentation and contract tests are the entire support layer. Write tests that assert the conversion contract (including error shapes) so a future upgrade fails loudly rather than silently changing hydration behavior.

Scaling. Runtime cost is negligible — param conversion is per-request reflection that is cheap and cacheable, dwarfed by any I/O in the request path. The scaling risk is organizational: a growing set of auto-hydrated DTOs whose validation semantics no single team owns. Keep DTOs close to their handlers and resist a shared DTO layer that spans bounded contexts.

Failure modes to instrument. Type-mismatch producing a 500 instead of a 400/422; unknown fields silently dropped or, worse, silently bound; validation bypassed when a binding path skips the validator; nested DTO failures with unhelpful stack traces; over-posting when hydration writes properties directly; hard breaks on a Symfony minor upgrade due to the stale constraint. Each of these should have an explicit test and, where cheap, a log line.

Ramp-up. Low for Symfony engineers already comfortable with argument resolvers — hours, not days. Moderate for Laravel engineers: the concept (request → typed object) transfers cleanly, but the mechanics do not, and forcing this bundle into a Laravel codebase creates an unfamiliar seam that will confuse new hires. Onboarding material should center on the DTO contract and the error-response matrix, since those outlive whichever implementation sits behind the interface.

Bottom line. The opportunity cost of skipping this is low and the cost of adopting it directly is asymmetric — you inherit a maintenance obligation for a capability you could reproduce in an afternoon. Use it as a reference implementation, establish the seam regardless, and only take the dependency if a spike proves it saves real work in a Symfony application you control.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console