doctrine/doctrine-laminas-hydrator
Laminas hydrator integration for Doctrine: extract and hydrate entity data using Doctrine's metadata and object manager, letting you convert between entities and arrays in Laminas applications with strategies for associations, collections, and embedded objects.
laminas/laminas-hydrator. The buy case is "don't write ~100–300 lines of custom hydration glue plus strategy classes." The build case is strong precisely because that's all it is — a small, replaceable adapter.spatie/laravel-data, or Symfony's ObjectMapper on the Symfony side. Pulling Laminas Hydrator into Laravel means a second, redundant mapping abstraction and an extra framework lineage in your dependency graph.Adopt when:
laminas/laminas-hydrator is already in the stack, or you have an approved plan to standardize on it.Look elsewhere when:
spatie/laravel-data. There is no product justification for adding Laminas components to a Laravel app.symfony/object-mapper.To executives: A free, MIT-licensed glue library that removes boilerplate when moving data between our database entities and API/import formats — but only for services on the Laminas stack. It is a low-cost tactical dependency with little community adoption, so it carries low upside and modest maintenance risk. Recommended action: no company-wide mandate; evaluate inside the one legacy service where it applies.
To engineering: Doctrine's hydrator adapters for laminas-hydrator — standard strategies, one less set of bespoke mappers, maintained alongside Doctrine's Laminas integration. The trade-off is framework lock-in and a thin user base (0 dependents), so we treat it as replaceable glue and keep our mapping behind our own interfaces. Not for new Laravel work — use API Resources or spatie/laravel-data there.
The ask: A 1–2 day spike in the Laminas service to measure boilerplate removed versus the cost of ownership. Success = measurable mapper code deleted and no upgrade friction; failure = we keep the in-house adapter and move on.
How can I help you explore Laravel packages today?