dentelis / hydrator
Extremely fast object and array php hydrator with strict type matching, array typings, enums, and union types
dev-main
2024-05-22 17:45 UTC
Requires
- php: ~8.2
Requires (Dev)
- phpunit/phpunit: ^11.2@dev
- rector/rector: dev-main
This package is auto-updated.
Last update: 2025-04-22 19:50:53 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