gowork/symfony-json-request
A Symfony package for handling JSON HTTP requests more cleanly. It helps decode application/json request bodies and integrate them with Symfony's Request object and controllers, simplifying JSON API endpoints and request data access.
$request->input() from a JSON body automatically, while vanilla Symfony does not populate the $request->request parameter bag from php://input. This package makes Symfony behave more like Laravel for downstream code that assumes parameter-bag access.Request type.$request->request->get('field') benefit from a compatibility layer instead of rewriting consumers.symfony/serializer, or a DTO/hydration layer. Any roadmap item expecting schema validation, type coercion, or nested-object mapping still needs a separate solution.Consider it when:
application/json.Look elsewhere when:
$request->json() and $request->input(); adding this package creates redundancy and a second, divergent input path.json_decode of the whole body has memory implications worth assessing before adoption.Overall recommendation: do not adopt as a dependency. The v0.3.0 Symfony 7 bump is welcome housekeeping and clears the version-compatibility objection, but it does not change the fundamentals — no tests, no dependents, one maintainer. Treat it as a reference implementation; a small internal listener with tests gives the same behavior with ownership and reviewability, and can be written against Symfony 7 directly. Reassess only if the project gains maintainers, tests, and downstream usage.
To executives: This is a tiny, single-purpose open-source utility that makes Symfony read JSON request bodies the way Laravel already does. Its newest release simply adds Symfony 7 support — routine upkeep, not new capability. It surfaces a real consistency question in our PHP estate — do our services handle JSON input the same way? — but it is not a strategic dependency: minimal adoption, no downstream users, one maintainer. My recommendation is unchanged: capture the pattern internally rather than take on the dependency, at a cost of roughly a day of engineering. The Symfony 7 support means it is no longer blocked on our upgrade path, so we can revisit cheaply if priorities change.
To engineering: The package bridges a genuine framework difference — Symfony's Request does not populate the parameter bag from a JSON body, Laravel's does. v0.3.0 adds Symfony 7 compatibility via a community PR, which is the only substantive change; there is still no visible test coverage. If we have Symfony endpoints consumed by code that expects $request->request->get(...), that's worth fixing deliberately: implement it in-house with tests and input validation, targeting the Symfony versions we actually run, and pair it with an explicit decision on DTO-based deserialization versus parameter-bag access. In Laravel services, use $request->json() and do not add this package.
How can I help you explore Laravel packages today?