PackageTrack
Sign in Get early access

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
Release Pre-release

Releases

latest 28
  1. 1.8.0 13 Feb 2026
    Release notes

    Fixed

    • PHP 8.5 support
    • Align serialize with hydrator picking up nested DTOs when #93 (by @WyriHaximus)
    Open source →
  2. 1.7.0 26 Sep 2025
    Release notes

    Added

    • Be able to filter out NULL values.
    • Default caster for DateTimeZone

    Fixed

    • Be able to assign more casters to promoted properties
    Open source →
  3. 1.6.1 14 Dec 2024
    Release notes

    Set correct release version

    Open source →
    Release notes

    Fixes

    • Fix PHP 8.4 deprecations
    Open source →
  4. 1.6.0 30 Oct 2024
    Release notes

    Added

    • Added interface for custom constructor resolution

    Fixes

    • Skip parsing of closure use statements
    Open source →
  5. 1.5.0 17 Aug 2024
    Release notes

    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.
    Open source →
  6. 1.4.0 03 Aug 2023
    Release notes

    Fixed

    • [Regression] Casters returning null causes problem for hydrator enums.

    Improved

    • Naive property type resolving now handles a bunch more cases.
    Open source →
  7. 1.3.1 24 Jun 2023
    Release notes

    Fixed

    • Only try to resolve one property from the docblock to prevent parsing error (#50)
    Open source →
  8. 1.3.0 01 Apr 2023
    Release notes

    Added

    • This is not a joke release.
    • MapperSettings can now also be specified using an interface.
    Open source →
  9. 1.2.0 11 Mar 2023
    Release notes

    Added

    • Added ability to define polymorhic object mapping (#29)
    Open source →
  10. 1.1.3 07 Mar 2023
    Release notes

    Fixed

    • Add mixed as native type in NaivePropertyTypeResolver (#40)
    Open source →
  11. 1.1.2 05 Feb 2023
    Release notes

    Fixed

    • Ensure generic template is of object type (#36)
    • Prevent method name collisions in case SomeThing and Some\Thing both exist
    Open source →
  12. 1.1.1 04 Feb 2023
    Release notes

    Fixed

    • Corrected @template generic usage for generated hydrator
    • Prevented exception when scalar type is resolved from a docblock
    Open source →
  13. 1.1.0 29 Dec 2022
    Release notes

    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.
    Open source →
  14. 1.0.0 28 Oct 2022
    Release notes
    • Functionally equivalent to 0.5.5, stable release.
    Open source →
  15. 0.5.5 15 Sep 2022
    Release notes
    • Support nullable enum properties #28
    Open source →
  16. 0.5.4 13 Sep 2022
    Release notes

    Fixed

    • Fix typo in PHPDoc parser regex pattern #27
    Open source →
  17. 0.5.3 09 Sep 2022
    Release notes

    Fixed

    • Fix cache keys colliding when using multiple casters without options #26
    Open source →
  18. 0.5.2 22 Aug 2022
    Release notes

    Fixed

    • Ignore use function/const statements when resolving the use statement map (#25)
    Open source →
  19. 0.5.1 09 Aug 2022
    Release notes

    Fixed

    • Handle omission of data for nullable parameters and parameters with a default
    Open source →
  20. 0.5.0 08 Aug 2022
    Release notes

    Added

    • Expose missing fields in UnableToHydrate exception.
    • Added information about which property caused hydration failure.
    Open source →
  21. 0.4.3 08 Jul 2022
    Release notes

    Fixed

    • Prevent type-error when casting null values for nullable properties (#23)
    Open source →
  22. 0.4.2 12 Jun 2022
    Release notes

    Fixed

    • Fixed phpstan template notations.
    Open source →
  23. 0.4.1 08 Jun 2022
    Release notes

    Added

    • The CastToDateTimeImmutable caster now supports setting a timezone.
    Open source →
  24. 0.4.0 05 Jun 2022
    Release notes

    Deprecations

    • The ObjectHydrator class was deprecated, use ObjectMapperUsingReflection and hint against the new ObjectMapper interface.
    • The ListOfObjects class was deprecated, use the IterableList object instead.
    • The KeyFormattingWithoutConversion class was deprecated, use the KeyFormatterWithoutConversion class instead.

    Breaking Changes

    • The ObjectHydrator class was converted into an interface named ObjectMapper, the main implementation is ObjectMapperUsingReflection.
    • The PropertyDefintion class was renamed to PropertyHydrationDefinition to be symmetrical with the new PropertySerializationDefinition.
    • The DefinitionProvider::provideDefinition method was deprecated in favour of the new provideHydrationDefinition for symmetry with provideSerializationDefinition.
    • The KeyFormatter interface was changed by adding a keyToPropertyName method, needed for serialization.
    • The ObjectHydrator::hydrateObjects return type class was renamed from ListOfObjects to IterableList.

    Added

    • The ObjectMapper interface was introduced, which represents both generated and reflection based mappers.
    • [Major Feature] Serialization was added to the main ObjectHydrator interface.
    • Array hydration now also has rudimentary support for docblock type hints (@param Type[] $name, @param array<Type> $name, @param array<string, Type> $name).
    Open source →
  25. 0.3.1 27 May 2022
    Release notes

    Fixed

    • Allow same hydrator to be used with different constructor options.
    Open source →
  26. 0.3.0 28 Apr 2022
    Release notes

    Added

    • Added ability to define nested input (#12)
    Open source →
  27. 0.2.0 01 Apr 2022
    Release notes

    Added

    • Added hydrateObjects; a way to hydrate a list of objects in one go
    Open source →
  28. 0.1.0 03 Jan 2022
    Release notes

    Added

    • Initial implementation of the object hydrator
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive