symplify/easy-hydrator
Symplify Easy Hydrator turns arrays into typed PHP objects via native attributes and constructor promotion. Map nested objects, arrays of objects, and custom keys without boilerplate or reflection code. A lightweight alternative to heavy serializers for clean DTO mapping in Laravel, Symfony, and pla...
deprecated-packages upstream are strong signals for the dependency review board — a "do not add" entry and, if already present, a scheduled removal.Consider it only in narrow, non-strategic contexts:
Look elsewhere when any of the following is true — which is most of the time:
cuyz/valinor, spatie/laravel-data (for Laravel DTOs), Laravel's own validation + FormRequest, or plain constructors with named arguments in PHP 8+.new Foo(...$payload) with named arguments is cheaper than any dependency.To executives (30 seconds): This is a small PHP utility that turns arrays into typed objects using constructor injection — the plumbing behind clean API and form handling. It is archived upstream, has no adopters, and carries no strategic upside, so my recommendation is not to adopt it and, if we already use it, to schedule removal during the next PHP upgrade. Cost of the alternative is low: equivalent functionality exists in components we already pay for, or is a few dozen lines of code we control.
To engineering leadership: Treat symplify/easy-hydrator as a sunset dependency. It solves a real problem — array → typed object mapping at application boundaries — but it is no longer maintained and gives us no leverage. The pattern is trivially reproducible and the maintained options (Symfony Serializer, spatie/laravel-data, cuyz/valinor) are already familiar. Recommendation: do not add it to new code; add a ticket to replace it where it exists. Migration cost is low because the surface area is small and the call sites are concentrated at input boundaries.
To the engineering team: No new dependency. If you want the ergonomics, either use named-argument constructors and a small static fromArray() factory, or pick one maintained mapper and standardize on it. If you must keep this package for legacy reasons, isolate it behind our own Hydrator interface so the swap is a one-file change next quarter.
How can I help you explore Laravel packages today?