dentelis / hydrator
Extremely fast object and array php hydrator with strict type matching, array typings, enums, and union types
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/dentelis/hydrator
Requires
- php: ~8.2
Requires (Dev)
- phpunit/phpunit: ^11.2@dev
- rector/rector: dev-main
This package is auto-updated.
Last update: 2025-11-22 21:17:40 UTC
README
Extremely fast php object and array hydrator with strict type matching, array typing, enums and type unions.
Converts simple data (obtained from json_decode or elsewhere) into objects/arrays of objects with strict typing.
Pros
- really fast (add proofs!)
- support typed arrays
- support nested objects/arrays
- support enums (both baked & unbaked)
- support union object type in object properties and arrays (union of scalar types is unsupported)
- uses constructor as well as overrides values
ToDO
- add examples
- add readme
- add speed comparison
- review exceptions
- add map support
- full union type support
- add extract method
- add native classes support (eg datetime etc)
- add extensions support