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

Object Mapper Bundle Laravel Package

opportus/object-mapper-bundle

Symfony bundle that integrates the opportus/object-mapper library, registering mapper services and configuration in the dependency injection container to simplify object-to-object mapping. Helps reduce boilerplate when converting DTOs, entities, and domain objects in PHP applications.

View on GitHub
Deep Wiki
Context7

Opportus Object Mapper Bundle integrates the Opportus object mapper into Symfony applications, making object-to-object mapping easy to configure and use through the dependency injection container. It helps decouple domain models from DTOs and keeps transformation logic clean and maintainable.

  • Symfony bundle integration with service container support
  • Autowired mapper services for controllers and services
  • Declarative mapping configuration
  • Seamless DTO and domain model conversion
Frequently asked questions about Object Mapper Bundle
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.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource