laminas/laminas-hydrator
Laminas Hydrator provides flexible strategies to hydrate and extract data between objects and arrays. Supports reflection, class methods, naming strategies, and custom hydrators, making it easy to map entities, DTOs, and forms cleanly across your application.
Feature release (minor)
Feature release (minor)
[@final](https://github.com/final) for future introduction of the final keyword in v5 thanks to @mairo744Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
Feature release (minor)
composer check](https://github.com/laminas/laminas-hydrator/pull/96) thanks to @kynxBackedEnumStrategy thanks to @kynxFeature release (minor)
Feature release (minor)
psr/cache thanks to @renovate[bot]Feature release (minor)
Feature release (minor)
README.md: replaced coveralls coverage badge (unused) with psalm's shepherd badge (type coverage) thanks to @sasezakiMapNamingStrategyTest, so that pattern would be only non non-empty-tring array-key (in test data provider) thanks to @sasezaki4.3.x bugfix release (patch)
4.3.x bugfix release (patch)
#69 adds caching to the UnderscoreToCamelCaseFilter and CamelCaseToUnderscoreFilter, providing a 75% performance improvement when these filters are hit for the same value names.
#73 modifies exceptions thrown via the ArraySerializableHydrator to make it easier to pinpoint what element caused the error.
Laminas\Hydrator\HydrationInterface::hydrate()Laminas\Hydrator\Aggregate\HydrateEvent
The change has no impact on functionality.Laminas\Hydrator\Strategy\BooleanStrategy. The class had been marked deprecated in 4.2.0, with the ScalarTypeStrategy listed as a replacement. However, on review, we determined that the mapping behavior of BooleanStrategy differed significantly from ScalarTypeStrategy and deserved its own implementation.4.2.x bugfix release (patch)
Laminas\Hydrator\Strategy\ScalarTypeStrategy, which will cast values to the scalar type specified when instantiating the strategy. The strategy supports int, float, string, and bool types, and also includes named constructors to simplify constructing instances that target each scalar type.Laminas\Hydrator\Strategy\BooleanStrategy. Users are urged to use the ScalarTypeStrategy instead.quick-start.md to reflect the fact that ObjectPropertyHydrator requires public properties thanks to @mojtabaahnClassMethodsHydrator.Total issues resolved: 0
Total pull requests resolved: 2
Total contributors: 2
ClassMethodsHydrator.ClassMethodsHydrator would occasionally have a scenario whereby no methods were cached, but a conditional would miss this fact, which would lead to a logic error later. The conditional has been updated.Feature release (minor)
4.0.x bugfix release (patch)
Total issues resolved: 0
Total pull requests resolved: 1
Total contributors: 1
36: Fix example in quick-start.md thanks to @vjik
4.0.x bugfix release (patch)
#30 modifies all Laminas\Hydrator\Filter\FilterInterface implementations shipped with the package, marking them as final. If you previously extended them, you will need to copy and paste the implementations, or open an issue requesting removal of the final keyword, detailing your use case.
#30 changes the signature of Laminas\Hydrator\Filter\FilterInterface::filter() to now accept a second, optional argument, ?object $instance = null. This argument's primary use case is with anonymous objects, to facilitate reflection; the ClassMethodsHydrator, for instance, was updated to pass the $instance value only when an anonymous object is detected. All filter implementations have been updated to the new signature.
next backward compatibility break release (major)
How can I help you explore Laravel packages today?