- Bugfix: Hydrator::parse() did not handle an empty options array correctly.
- Make Hydrator::parse() static and public.
- Update gitlab->github.
- Remove gitlab->github mirroring from CI.
- Added Hydrator::decode().
- Ongoing code/doc cleanup.
- Stripped out old inline documentation.
- added CONTRIBUTING.md.
- Updated contact email.
- Add Property::factory(Closure $fn) to allow for more complex hydration of objects that don't implement Hydratable.
- Deprecate Property::construct().
- Add bool $passProperty argument (default true) to Property::getter() and Property::setter() to disable passing of the property as an argument to getter/setter methods. Change is backwards compatible.
- Properties that have not been bound to a class or a closure (via Property::with()) now use Reflection to see if the property has a class type that implements Hydratable. If it does, then the property is automatically bound to the class.
- Documentation updates.
- Moved applyTransform logic from Encoder to EncoderRule.
- Documentation updates.
- Improvements to README
- Added required properties - hydration will fail if a required property is missing.
- Doc fixes.
- Encoder transform functions accessed via reflection, may now be private/protected.
- Encoder transform functions changed to return transformed value.
- Improvements suggested by vimeo/psalm static analysis.
- Bugfix: preprocessing drop commands was an over-optimization.
- Bugfix: Bad args to Encoder::encodeProperty() on internal call.
- Modify arguments passed to setter closure to pass the Property instead of just the property options.
- Add Property::getter() to allow complex retrieval.
- Add Property::getOptions() to retrieve current options.
- Adjust update tests and add new test for "synthetic" properties.
- Fix bug and wrong delimiter in Property::encodeWith().
- Added encoding capabilities to facilitate converting structures back to user-friendly configuration files.
- Added
options
argument to Hydrator::addProperties() to bulk configure the properties, e.g. with a common validation method or ignore status. - Added Property::getClass(). If the associated class is constant, this gets the class name.
- Use the options array to pass the current Property into all closures and method calls.
- Allow passing of the value for validation into the validation closure by reference.
- Use the options array to pass the current Property into Setter methods.
- New Hydration methods: addProperties(), getSource(), getTarget(), hasSource(), and hasTarget()
- Initial release
- Replaces Abivia\Configurable