patchlevel / hydrator
A library for seamless hydration of objects to arrays - and back again, optimized for developer experience and performance
2.0.1
2026-09-01 07:51 UTC
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- ext-openssl: *
- psr/cache: ^2.0.0 || ^3.0.0
- psr/simple-cache: ^2.0.0 || ^3.0.0
- symfony/type-info: ^7.3.0 || ^8.0.0
Requires (Dev)
- infection/infection: ^0.32.4
- patchlevel/coding-standard: ^1.3.0
- phpat/phpat: ^0.12.2
- phpbench/phpbench: ^1.4.3
- phpstan/phpstan: ^2.1.39
- phpstan/phpstan-phpunit: ^2.0.15
- phpunit/phpunit: ^11.5.53
- symfony/var-dumper: ^5.4.29 || ^6.4.0 || ^7.0.0 || ^8.0.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- 2.1.x-dev
- 2.0.x-dev
- 2.0.1
- 2.0.0
- 1.24.x-dev
- 1.24.1
- 1.24.0
- 1.23.x-dev
- 1.23.1
- 1.23.0
- 1.22.x-dev
- 1.22.1
- 1.22.0
- 1.21.x-dev
- 1.21.0
- 1.20.x-dev
- 1.20.0
- 1.19.x-dev
- 1.19.0
- 1.18.x-dev
- 1.18.0
- 1.17.x-dev
- 1.17.0
- 1.16.x-dev
- 1.16.0
- 1.15.x-dev
- 1.15.0
- 1.14.x-dev
- 1.14.0
- 1.13.x-dev
- 1.13.0
- 1.12.x-dev
- 1.12.0
- 1.11.x-dev
- 1.11.0
- 1.10.x-dev
- 1.10.0
- 1.9.x-dev
- 1.9.0
- 1.8.x-dev
- 1.8.1
- 1.8.0
- 1.7.x-dev
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.x-dev
- 1.6.0
- 1.5.x-dev
- 1.5.1
- 1.5.0
- 1.4.x-dev
- 1.4.1
- 1.4.0
- 1.3.x-dev
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.x-dev
- 1.2.0
- 1.1.x-dev
- 1.1.0
- 1.0.x-dev
- 1.0.0
- 1.0.0-beta5
- 1.0.0-beta4
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- dev-1.24.x-merge-up-into-2.0.x_OV2odrS9
- dev-1.24.x-merge-up-into-2.0.x_6GHa1wgd
- dev-upcaster
- dev-generated-middleware
- dev-deepclone
- dev-1.22.x-merge-up-into-2.0.x_Sg5gRHgP
- dev-1.20.x-merge-up-into-2.0.x_D2m6MMOt
- dev-1.19.x-merge-up-into-2.0.x_r1Rz4IOl
- dev-add-type-in-property-metadata
- dev-1.17.x-merge-up-into-2.0.x_fkbQGuYV
- dev-direct-access
- dev-improve-performance
- dev-ai-performance
- dev-1.15.x-merge-up-into-2.0.x_MvImQBk5
- dev-1.14.x-merge-up-into-2.0.x_cxWMzteY
- dev-extension-api-v2
- dev-extension-api
- dev-drop-php82
- dev-update-phpunit-v12
- dev-add-symfony-serializer-benchmark
- dev-poc-nested-subject-id
This package is auto-updated.
Last update: 2026-09-07 21:46:49 UTC
README
Hydrator
"A library for seamless hydration of objects to arrays - and back again, optimized for developer experience and performance."
Features
- Extract objects to arrays and hydrate them back, without calling the constructor
- Works with
final,readonlyclasses, property promotion and deeply nested structures - Automatic normalizer resolution for enums, date types, collections, array shapes and objects
- Rename or exclude fields with attributes
- Lazy hydration of objects with PHP 8.4 lazy proxies
- Pluggable guessers and extensions to customize the process
- Safe usage of Personal Data with crypto-shredding
- Metadata caching with any PSR-6 or PSR-16 cache
- Developer experience oriented and fully typed
- and much more...
Installation
composer require patchlevel/hydrator
Documentation
Integration
Contributing
We are open to contributions as long as they are in line with our BC-Policy.
Also note that the composer.lock is always generated with the newest supported PHP version as this is the version our tools run in the CI.