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 Object Bundle

Request Object Bundle Laravel Package

mcc-api-tools/request-object-bundle

A Symfony bundle for turning incoming HTTP requests into typed request objects. Centralize validation, mapping, and input handling so controllers stay clean, reusable, and easier to test across API endpoints and request workflows.

View on GitHub
Deep Wiki
Context7

MCC Request Object Bundle brings the request object pattern to Symfony: map incoming HTTP data into dedicated, typed PHP objects instead of juggling arrays and Request calls. This keeps controllers thin, improves discoverability, and makes request handling easier to test and maintain.

  • Convert request data into typed, immutable objects
  • Integrate cleanly with Symfony and its validation component
  • Reduce controller boilerplate and manual array handling
  • Configure mapping via attributes or bundle configuration
  • Encourage consistent, testable API request handling
Frequently asked questions about Request Object Bundle
Is mcc-api-tools/request-object-bundle a Laravel package or a Symfony bundle?
It is a Symfony bundle, not a Laravel package. The Bundle suffix, the iliabox namespace, and the typical DependencyInjection extension plus services.yaml layout all point to Symfony. Laravel has no concept of bundles; it uses service providers, facades, and container bindings. There is no RequestObjectServiceProvider, no config publishing, and no package auto-discovery, so the integration with a Laravel application is effectively zero.
Can I install this Symfony bundle in a Laravel app with Composer?
Technically yes, composer require will work, but it drags Symfony contracts and http-foundation into your Laravel lockfile as a parallel framework substrate. Laravel already ships its own symfony components, so a divergent constraint is a realistic conflict risk. You would be adding a dependency for a class you could copy into app/Support in about ten minutes. Vendoring the base class with an MIT attribution header is almost certainly the better call.
How do I implement typed request objects in Laravel without this package?
Use Laravel's own lanes: a FormRequest for validation plus a plain-old-PHP-object DTO that you hydrate from the validated array, or a package like spatie/laravel-data for richer coercion. Wire the DTO through the container or resolve it in a middleware or controller method. This keeps a single request-handling abstraction instead of competing with FormRequest.
Does this bundle support Laravel 10, 11 or 12?
No Laravel version support is declared, because it is a Symfony bundle and not a Laravel package. There is no service provider, no config file to publish, and no Laravel-specific test matrix. Any Laravel compatibility you get is incidental, coming only from the transitive Symfony components it pulls in. Verify the PHP constraint in composer.json against your runtime before considering it.
How does the bundling parse, validate and coerce incoming HTTP data?
The README excerpt does not say, so this must be confirmed by reading the source. The key question is whether the RequestObject owns validation and coercion rules or delegates to Symfony's validator and serializer. Equally important is whether the RequestObject is a true POPO or leaks Symfony's Request object into its public API, which would defeat any portability argument for Laravel.
What are the best alternatives to this bundle for typed request DTOs in Laravel?
Laravel's FormRequest combined with a hand-written DTO covers most cases and stays idiomatic. spatie/laravel-data is the mature choice when you want nested objects, casting, and validation in one place. If you only need the request-object pattern, a single abstract class in app/Support with a fromRequest factory is enough. All three avoid introducing a second, Symfony-flavoured request abstraction.
Is this package production-ready and safe to depend on?
Treat it as unverified. It has one star, zero dependents, and a single maintainer, which means no downstream battle-testing and no community pressure on correctness or security. It is unknown whether a test suite exists at all, and coverage of the request-parsing path is undocumented. For production, fork or vendor the logic under your own namespace rather than adding the dependency.
Why is the latest release of this package dated in the future?
The metadata shows a release date of 2026-07-07, which is either a metadata error, a skewed system clock, or a speculatively tagged version. In all three cases the version provenance should be treated as unverified. Resolve this with the maintainer or by inspecting the git tags before you rely on any specific version constraint.
How much code is in the bundle, and does it depend on symfony/http-foundation or http-kernel?
The repository structure suggests a base RequestObject class plus one compiler pass, likely under roughly 200 lines total. If that holds, the bundle scaffolding is dead weight and only the class is worth keeping. Read the source to confirm the line count and check whether anything imports symfony/http-foundation or symfony/http-kernel. That single check decides whether the pattern is portable to Laravel at all.
Is the package actively maintained, and what should I do if I need fixes?
There is no evidence of an active community around it; it looks like a personal utility published to Packagist by a single maintainer. Check the issue tracker for response times before depending on upstream fixes. If you do adopt the pattern, fork it into an internal package under your own namespace so you control the release cadence and can patch it immediately.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo