- Is opportus/object-mapper-bundle a Laravel package?
- No. It is a Symfony bundle that wires the Opportus object mapper into the Symfony dependency injection container. It does not ship a Laravel service provider, facade, or config integration. Laravel teams should use a Laravel-native mapper or a framework-agnostic mapper library directly instead of this bundle.
- How do I install opportus/object-mapper-bundle?
- Installation is standard Composer plus Symfony bundle registration in bundles.php or config/bundles.php. There is no Laravel package discovery or service provider step. Before installing, confirm that the package constraints match your pinned symfony/* and php versions with composer why-not.
- Which Symfony and PHP versions does this bundle support?
- The last release was in May 2022, so it likely targets Symfony 5.4 or 6.0 and PHP 8.0 or 8.1. Compatibility with Symfony 6.4, Symfony 7.x, PHP 8.2, and PHP 8.3 is unproven. Run a time-boxed compatibility spike and check composer constraints before design work.
- Can I use it to map Eloquent models to DTOs in Laravel?
- Not directly. The bundle is built around Symfony container wiring and per-mapping-pair service configuration, so its integration layer does not apply to Laravel. If the underlying mapper core is framework-agnostic, you could evaluate that library directly, but the bundle itself is the wrong shape for Laravel. For Eloquent-to-DTO mapping, prefer a Laravel-native package or hand-written mappers.
- How do I configure mapping between two object types?
- The bundle exposes mapping services through the Symfony container and is configured per mapping pair using extensible controls and mapping strategies. Exact configuration syntax should be confirmed by reviewing the bundle source and README because the provided context does not include full examples. Keep configuration behind an internal interface so the mapper remains an implementation detail.
- What happens when source fields are missing or types do not match?
- The provided context does not define the semantics for missing source fields, type mismatches, nulls, or partial mappings. The mapper may throw, skip, coerce, or silently leave values unset, and that behavior must be verified in source and tests. Write explicit test cases for these cases before relying on the package in production.
- Does it support nested objects, collections, and readonly or promoted properties?
- Nested and collection mapping are not confirmed in the provided context, and reflection-based mappers commonly have edge cases with uninitialized typed properties, constructor promotion, readonly classes, and circular references. A spike should exercise nested objects, collections, nulls, and readonly/promoted properties. Do not assume support without direct tests against your Symfony and PHP versions.
- Is opportus/object-mapper-bundle safe for production use?
- The package has weak maintenance signals: 2 stars, 0 dependents, a last release dated 2022-05-25, and a composite score of 0.07. There is no evidence of production usage, so confidence must come from source review and a compatibility spike rather than reputation. MIT licensing and a small dependency surface limit legal and supply-chain exposure, but staleness and abandonment are the dominant risks.
- What are good alternatives to this Symfony object mapper bundle?
- Common alternatives include JoliCode AutoMapper, Symfony Serializer, and hand-written assembler or mapper classes. For Laravel applications, use a Laravel-native mapper or explicit DTO assembly instead of a Symfony bundle. If you adopt this package, hide it behind your own ObjectMapperInterface so swapping to an alternative is a one-adapter change.
- Is the package still maintained and tested?
- The available signals point to low maintenance activity: the last release was 2022-05-25, with 2 stars and 0 dependents. The context does not confirm an active test suite, static analysis, CI, or issue response cadence. Inspect the repository, open issues, pull requests, and CI configuration before adopting it, and consider vendoring or forking under your organization if you proceed.