- Is mark-gerarts/automapper-plus-bundle a Laravel package?
- No. It is a Symfony bundle that registers AutoMapperPlusBundle and exposes the mapper as the automapper_plus.mapper service. Laravel applications should use the framework-agnostic mark-gerarts/automapper-plus library directly behind a custom service provider instead of installing this bundle.
- How do I install AutoMapperPlusBundle in a Symfony application?
- Run composer require mark-gerarts/automapper-plus-bundle, then register AutoMapperPlus\AutoMapperPlusBundle\AutoMapperPlusBundle in your bundles configuration or let Symfony Flex handle it. The bundle supports Symfony 3.4 through 8.x, so no special wiring is needed on supported versions.
- How do I register mapping configurations with AutoMapperPlusBundle?
- Create a class that implements AutoMapperConfiguratorInterface and define a configure method that receives AutoMapperConfigInterface. Inside configure, call registerMapping and forMember to describe source-to-destination transformations. If the class is registered as a service with autoconfigure enabled, the bundle tags it automatically.
- Does automapper-plus-bundle support Laravel 10 or Laravel 11?
- There is no official Laravel support. The package is a Symfony bundle and its compatibility is tracked against Symfony versions only. A Laravel integration would be custom engineering using the core library plus a thin service provider, and it should be budgeted and benchmarked before adoption.
- What Laravel version does mark-gerarts/automapper-plus-bundle require?
- None. The bundle does not target Laravel at all; it is built for Symfony 3.4 through 8.x. Installing it in a Laravel codebase would pull Symfony framework components into a parallel container, which is an anti-pattern for most Laravel applications.
- How should I test mappings when using AutoMapper+ in Laravel?
- Spike the core mark-gerarts/automapper-plus library in a single module, resolve the mapper through your custom provider, and write unit tests that call map() and assert the resulting DTO or value object. Keep mapping profile fixtures versioned so regressions are caught in CI. For Symfony, inject AutoMapperInterface into the test and assert the same way.
- What are the alternatives to this bundle for Laravel DTO mapping?
- Laravel teams typically evaluate spatie/laravel-data, Eloquent API Resources, or a small hand-written mapper before considering a mapping abstraction. The reusable part of this project is the underlying mark-gerarts/automapper-plus library, not the Symfony bundle. Choose a mapping layer only if DTOs and clean-architecture patterns are already architectural commitments.
- Is automapper-plus-bundle actively maintained and safe for production?
- The project has a small adoption profile with low star and dependent counts and a single maintainer, so bus-factor and longevity risk are real. Treat it as unproven in production and pin to a patch version you have tested. Assign an internal owner for mapping profiles and have an exit plan before rolling it out broadly.
- How does reflection-based mapping affect performance in production?
- AutoMapper+ relies on reflection, so benchmark it against hand-written mapping for your actual volume and object graph complexity. Tune OPcache so compiled mappings are cached effectively, and avoid rebuilding configuration on every request. For high-throughput paths, measure before committing to the abstraction.
- Can AutoMapper+ map Eloquent models and Doctrine entities?
- The core mapping logic is ORM-agnostic, so both Eloquent models and Doctrine entities can be mapped in principle. The Symfony bundle only wires that core mapper into Symfony's service container. In Laravel, you would provide that wiring yourself and verify behavior against your own model shapes.