eventsauce/object-hydrator
Converts structured data into strict objects.
1.8.0
2.6M downloads/mo
#2542 most downloaded on Packagist
EventSaucePHP/ObjectHydrator
What this package is like to depend on
Last release 6 months ago
13 Feb 2026
Release timing varies
gaps range from 4 weeks to 13 months
Nearly every release is documented
notes for 28 of 28 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
28 releases · first in 2022
2 releases in the last 12 months
see the full history below
Release timeline
28 releases · Jan 2022 to Feb 2026
2023
2024
2025
2026
Releases
latest 28-
1.8.013 Feb 2026Release notes
Open source →Fixed
- PHP 8.5 support
- Align serialize with hydrator picking up nested DTOs when #93 (by @WyriHaximus)
-
1.7.026 Sep 2025Release notes
Open source →Added
- Be able to filter out NULL values.
- Default caster for DateTimeZone
Fixed
- Be able to assign more casters to promoted properties
-
1.6.114 Dec 2024 -
1.6.030 Oct 2024Release notes
Open source →Added
- Added interface for custom constructor resolution
Fixes
- Skip parsing of closure use statements
-
1.5.017 Aug 2024Release notes
Open source →Improved
- Default to empty array in default serializer repository
- Allow skipping public method serialization
- Allow hydrating an array of enums.
- Serialize unit enums to their name.
-
1.4.003 Aug 2023Release notes
Open source →Fixed
- [Regression] Casters returning null causes problem for hydrator enums.
Improved
- Naive property type resolving now handles a bunch more cases.
-
1.3.124 Jun 2023Release notes
Open source →Fixed
- Only try to resolve one property from the docblock to prevent parsing error (#50)
-
1.3.001 Apr 2023Release notes
Open source →Added
- This is not a joke release.
MapperSettingscan now also be specified using an interface.
-
1.2.011 Mar 2023 -
1.1.307 Mar 2023 -
1.1.205 Feb 2023Release notes
Open source →Fixed
- Ensure generic template is of object type (#36)
- Prevent method name collisions in case SomeThing and Some\Thing both exist
-
1.1.104 Feb 2023Release notes
Open source →Fixed
- Corrected @template generic usage for generated hydrator
- Prevented exception when scalar type is resolved from a docblock
-
1.1.029 Dec 2022Release notes
Open source →Added
- Added ability to omit all public method from serialization.
- Added ability to omit all public properties from serialization.
- Added ability to omit specific public methods and properties from serialization.
-
1.0.028 Oct 2022 -
0.5.515 Sep 2022 -
0.5.413 Sep 2022 -
0.5.309 Sep 2022Release notes
Open source →Fixed
- Fix cache keys colliding when using multiple casters without options #26
-
0.5.222 Aug 2022Release notes
Open source →Fixed
- Ignore use function/const statements when resolving the use statement map (#25)
-
0.5.109 Aug 2022Release notes
Open source →Fixed
- Handle omission of data for nullable parameters and parameters with a default
-
0.5.008 Aug 2022Release notes
Open source →Added
- Expose missing fields in UnableToHydrate exception.
- Added information about which property caused hydration failure.
-
0.4.308 Jul 2022Release notes
Open source →Fixed
- Prevent type-error when casting null values for nullable properties (#23)
-
0.4.212 Jun 2022 -
0.4.108 Jun 2022Release notes
Open source →Added
- The
CastToDateTimeImmutablecaster now supports setting a timezone.
- The
-
0.4.005 Jun 2022Release notes
Open source →Deprecations
- The
ObjectHydratorclass was deprecated, useObjectMapperUsingReflectionand hint against the newObjectMapperinterface. - The
ListOfObjectsclass was deprecated, use theIterableListobject instead. - The
KeyFormattingWithoutConversionclass was deprecated, use theKeyFormatterWithoutConversionclass instead.
Breaking Changes
- The
ObjectHydratorclass was converted into an interface namedObjectMapper, the main implementation isObjectMapperUsingReflection. - The
PropertyDefintionclass was renamed toPropertyHydrationDefinitionto be symmetrical with the newPropertySerializationDefinition. - The
DefinitionProvider::provideDefinitionmethod was deprecated in favour of the newprovideHydrationDefinitionfor symmetry withprovideSerializationDefinition. - The
KeyFormatterinterface was changed by adding akeyToPropertyNamemethod, needed for serialization. - The
ObjectHydrator::hydrateObjectsreturn type class was renamed fromListOfObjectstoIterableList.
Added
- The
ObjectMapperinterface was introduced, which represents both generated and reflection based mappers. - [Major Feature] Serialization was added to the main
ObjectHydratorinterface. - Array hydration now also has rudimentary support for docblock type hints (
@param Type[] $name,@param array<Type> $name,@param array<string, Type> $name).
- The
-
0.3.127 May 2022Release notes
Open source →Fixed
- Allow same hydrator to be used with different constructor options.
-
0.3.028 Apr 2022 -
0.2.001 Apr 2022Release notes
Open source →Added
- Added
hydrateObjects; a way to hydrate a list of objects in one go
- Added
-
0.1.003 Jan 2022