retailcrm/auto-mapper-bundle
Symfony bundle integrating RetailCRM AutoMapper to automatically map arrays and objects to typed DTOs. It simplifies request/response hydration with service auto-configuration and support for nested and collection mappings.
Architecture fit
Bundle registration, DI container compiler passes, and service tagging — none of which exist in a Laravel application without adaptation.toDto()/fromEntity() methods or configuring a third-party mapper, the bundle auto-discovers mapper services and wires them through the container. This is architecturally a DTO/hydration layer concern, sitting between the persistence layer (Doctrine/Eloquent) and the transport layer (controllers, API resources, queue consumers).spatie/laravel-data, or explicit Mapper classes. Adopting this bundle means introducing a second, Symfony-oriented abstraction for a problem Laravel already solves idiomatically — a net increase in conceptual surface area.Integration feasibility
Bundle class, (b) manually registering the mapper services and any tag-based collection logic, (c) replacing Symfony's autowire/autoconfigure assumptions with Laravel's container bindings or a custom compiler-like registration step.bundles.php entry plus attribute/tag configuration, and mappers resolve automatically. This is the package's intended and only well-trodden path.Technical risk
Key questions
Stack fit
composer require retailcrm/auto-mapper-bundle, register in config/bundles.php, tag mapper services. Zero-friction if the team already uses Symfony's DI heavily.MappingServiceProvider that reads a config array of mapper classes, binds them as singletons, and exposes a thin Mapper contract. We would own that adapter indefinitely.Migration path
MapperInterface in application code and treat the package as one implementation behind it. This preserves optionality: swapping to spatie/laravel-data, Symfony Serializer, or hand-written mappers becomes a local change rather than a codebase-wide refactor."repositories" with a VCS pin or a path repository) so that upstream archival or an incompatible release cannot break our build.Compatibility
symfony/* constraints are the most likely install failure.doctrine/* or serializer coupling that would drag in transitive dependencies we don't already carry.Sequencing
spatie/laravel-data.MapperInterface, with contract tests pinning expected field-by-field output.Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?