Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Hydrator Laravel Package

patchlevel/hydrator

Hydrate objects to arrays and back without calling constructors. Supports final and readonly classes, nested structures, enums, dates, lazy hydration, field renaming, and metadata caching with a developer-friendly, fully typed API.

View on GitHub
Deep Wiki
Context7

Mutation testing badge Latest Stable Version License

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, readonly classes, 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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource