- Can I use retailcrm/auto-mapper-bundle in a Laravel application?
- It is a Symfony bundle, not a Laravel package. Laravel has no Bundle registration or Symfony compiler passes, so you must bypass the Bundle class, register mapper services manually, and replace autowire/autoconfigure assumptions. It is low-fit as shipped; only adopt it with a maintained adapter.
- How do I install retailcrm/auto-mapper-bundle with Composer?
- Install it with Composer using retailcrm/auto-mapper-bundle. In Symfony, enable the bundle in bundles.php and configure services and tags. In Laravel, installation alone is not enough; you still need custom container registration and integration code. Verify PHP and Symfony version constraints before installing.
- Does this package work with Laravel 10 or Laravel 11?
- No native Laravel support is documented. The package targets Symfony bundle and DI features, so Laravel 10 or 11 compatibility is not a simple version-matrix question but an integration-project question. You would own the adapter and must test it against your specific Laravel version.
- What is retailcrm/auto-mapper-bundle used for?
- It maps arrays and objects to typed DTOs using convention-based auto-discovery of mapper services. It targets request and response hydration, including nested and collection mappings. In Laravel, similar needs are usually handled by API Resources, spatie/laravel-data, or explicit mapper classes.
- Is retailcrm/auto-mapper-bundle production-ready?
- The evaluation flags adoption risk: 1 star, 0 dependents, no community corpus, and single-vendor continuity. The MIT license lets you vendor and patch it, but you bear the maintenance cost. A release date anomaly of 2026-08-03 should be verified before relying on it.
- How does the auto-mapper handle nested objects and collections?
- The overview says it supports nested and collection mappings through auto-configured mapper services. Exact behavior depends on your mapper definitions and service tagging. Because mapping is convention and reflection based, verify nested and collection edge cases with unit tests.
- What are alternatives to retailcrm/auto-mapper-bundle for Laravel DTO mapping?
- Laravel-native options include API Resources, spatie/laravel-data, and hand-written mapper classes. These avoid introducing a Symfony-oriented abstraction for a problem Laravel already solves idiomatically. Choose the bundle only if you already have Symfony components or specifically need its convention-based mapper discovery.
- Does the auto-mapper use reflection, and will it hurt performance?
- Auto-mapping typically relies on reflection and PHP attributes; the provided material does not document a compiled mapping plan or cache. That can add runtime cost on hot paths. Benchmark per-object overhead against a hand-written mapper before production use.
- How do I test mappers built with retailcrm/auto-mapper-bundle?
- Test each mapper with unit tests that assert DTO field values, nested mappings, collection handling, and mismatch behavior. There is no obvious schema or contract artifact to diff in CI, so tests are your contract. Include cases for missing or renamed source properties.
- How is retailcrm/auto-mapper-bundle maintained and supported?
- It is a RetailCRM single-vendor package with negligible external usage, so community support is minimal. MIT licensing allows forking and patching, but no fork momentum exists to sustain it. Check release history, the PHP and Symfony support matrix, and whether the listed release is real and tagged.