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

Data Mapper Bundle Laravel Package

troytft/data-mapper-bundle

A Symfony bundle for troytft/data-mapper that simplifies mapping arrays and objects into typed DTOs. Configure your mappings and let the mapper handle conversion, reducing repetitive hydration code across controllers and services.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor. Despite being catalogued as a Laravel/PHP package, troytft/data-mapper-bundle is a Symfony bundle: it ships a DependencyInjection extension, compiler passes, and service tags intended to register mappers into the Symfony container. Laravel's service container, package discovery, and config publishing have no equivalent hooks, so the package cannot be installed and used idiomatically in a Laravel application without an adapter layer. The underlying pattern (mapping request/array payloads into typed DTOs) is sound and relevant, but the delivery mechanism is wrong for the target stack.

Integration feasibility — low. There is no Laravel service provider, no facade, no config file compatible with config/*.php conventions, and no documented framework-agnostic entry point. Making it work would mean either (a) forking and re-implementing the bundle bootstrapping as a Laravel provider, or (b) instantiating the mapper classes manually and wiring dependencies by hand. Both convert a "dependency" into an owned code fork. With 8 stars and 0 dependents, there is no evidence of anyone having done this successfully, so we would be the first — and the only — integrator.

Technical risk — high. The package is explicitly marked [DEPRECATED] with the project closed, and the last release was 2022-08-25. That means: no security response, no PHP 8.2/8.3/8.4 compatibility guarantees, no Symfony 6/7 support, and pinned transitive constraints that will increasingly conflict with a modern Laravel composer.json. The upstream author redirects new work to troytft/rest-api-bundle, which is likewise Symfony-oriented and does not solve the Laravel fit problem. A zero-dependent, single-maintainer, archived package is a supply-chain liability out of proportion to the small amount of mapping logic it provides.

Key questions.

  • Is there any existing production code path already consuming this bundle, or is this purely a greenfield evaluation? If greenfield, the answer is almost certainly "do not adopt."
  • Which PHP and Symfony/Laravel versions must be supported, and does the package's constraint set even resolve alongside them?
  • Does the mapping behaviour we need (nested objects, collections, type coercion, validation error surfacing) exist in maintained alternatives such as spatie/laravel-data, symfony/serializer, or hand-written hydrators?
  • If we fork, who owns it, and what is the ongoing cost of tracking PHP/Laravel upgrades against an unmaintained codebase?
  • Is the "opportunity" score of 10.29 based on anything other than low adoption (i.e., is it an inverse-popularity artefact rather than a signal of value)?

Integration Approach

Stack fit — none. The package targets Symfony's kernel and DI container. Laravel's container resolves constructor dependencies automatically, which covers most of what the bundle's compiler passes were doing; the remaining value is a thin mapping utility that is straightforward to reproduce. Attempting to force the bundle in would add a parallel container bootstrapping path and a second configuration idiom to the codebase for negligible benefit.

Migration path — do not start; if already present, exit. For greenfield work, adopt a maintained equivalent: spatie/laravel-data for request-to-DTO mapping with built-in validation and Laravel-native casting, or plain readonly DTOs plus explicit factory methods if the mapping surface is small. For Symfony-side services, symfony/serializer with normalizers is the supported route. If the package is already in composer.json, treat this as a removal project, not an upgrade project.

Compatibility. Expect PHP 7.4/8.0-era syntax and Symfony 4.4/5.x component constraints. Verify by attempting a resolve against the target composer.json in a scratch branch before any design work — a failed resolve ends the conversation cheaply. Watch for conflicts on symfony/* transitive packages if any Symfony components are pulled in indirectly, and for deprecation notices that Laravel's error handler will escalate in test suites.

Sequencing.

  1. Inventory — confirm whether the bundle appears in any composer.json across the estate, including transitive appearances; with 0 dependents this should be fast.
  2. Freeze — if present, pin the exact version and add it to the dependency-risk register; block new usages via a CI check or a composer.json lint rule.
  3. Characterise behaviour — write characterisation tests around the current mapping calls (input shapes, null handling, nested collections, failure cases) so the replacement is provably equivalent.
  4. Build the replacement — implement the mapping layer behind a first-party interface (PayloadMapper or similar) so call sites depend on our abstraction, not the vendor's classes.
  5. Cut over and delete — swap the implementation, run the characterisation suite, then remove the dependency and its config entirely. Do not leave a compatibility shim in place "just in case."
  6. Document — record the decision and the reasoning so the deprecation is not re-litigated when the next person finds the package on Packagist.

Operational Impact

Maintenance. Effectively zero upstream maintenance, so the full cost transfers to us. Any fork becomes a permanently owned artefact requiring PHP-version bumps, security triage, and compatibility work at every framework upgrade — a recurring tax for a small amount of mapping logic that a maintained package provides for free. The 2022 freeze also means the code will silently drift out of step with PHP deprecations until something breaks at an inconvenient time.

Support. No vendor, no active issue tracker, no community of integrators to consult (0 dependents, 8 stars). Internal engineers cannot escalate; they will read the source, which is the only documentation that will exist. On-call runbooks will need to describe behaviour derived by inspection rather than by specification, which is a poor foundation for incident response.

Scaling. The mapping work itself is CPU-light and unlikely to be a throughput bottleneck — the operational risk is not performance, it is correctness and change velocity. Large or deeply nested payloads may expose recursive mapping behaviour that was never designed for our data shapes, and there is no upstream to patch it. Treat any performance concern as secondary to the maintainability concern.

Failure modes. Expect: unhandled mapping exceptions on type mismatch that surface as 500s rather than validation errors; silent null assignment for missing keys, which hides contract drift between producer and consumer; inconsistent handling of nested objects and collections; and no structured error context, making production diagnosis slow. Because the package predates current Laravel error-handling conventions, exception rendering and logging may not integrate cleanly, and deprecation notices may pollute logs. Each of these needs an explicit test in the characterisation suite before replacement.

Ramp-up. Low ceiling, high friction: no current docs, no examples matching our stack, and a Symfony mental model that Laravel engineers must translate. A mid-level engineer should budget roughly half a day to understand the mapping semantics and considerably longer to be confident enough to modify them. Contrast with a maintained Laravel-native alternative where onboarding is measured in minutes and answers are searchable.

Recommendation. Do not adopt. The package is deprecated, framework-mismatched, and unmaintained; the correct action is to standardise on a maintained Laravel-native mapping approach and, if the bundle is already present, execute the removal sequence above. The 10.29 "opportunity" score should be read as a low-adoption artefact, not as evidence of untapped value.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings