All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Only try to resolve one property from the docblock to prevent parsing error (#50)
- This is not a joke release.
MapperSettingscan now also be specified using an interface.
- Added ability to define polymorhic object mapping (#29)
- Add mixed as native type in NaivePropertyTypeResolver (#40)
- Ensure generic template is of object type (#36)
- Prevent method name collisions in case SomeThing and Some\Thing both exist
- Corrected @template generic usage for generated hydrator
- Prevented exception when scalar type is resolved from a docblock
- Added ability to omit all public method from serialization.
- Added ability to omit all public properties from serialization.
- Added ability to omit specific public methods and properties from serialization.
- Functionally equivalent to 0.5.5, stable release.
- Support nullable enum properties #28
- Fix typo in PHPDoc parser regex pattern #27
- Fix cache keys colliding when using multiple casters without options #26
- Ignore use function/const statements when resolving the use statement map (#25)
- Handle omission of data for nullable parameters and parameters with a default
- Expose missing fields in UnableToHydrate exception.
- Added information about which property caused hydration failure.
- Prevent type-error when casting null values for nullable properties (#23)
- Fixed phpstan template notations.
- The
CastToDateTimeImmutablecaster now supports setting a timezone.
- The
ObjectHydratorclass was deprecated, useObjectMapperUsingReflectionand hint against the newObjectMapperinterface. - The
ListOfObjectsclass was deprecated, use theIterableListobject instead. - The
KeyFormattingWithoutConversionclass was deprecated, use theKeyFormatterWithoutConversionclass instead.
- The
ObjectHydratorclass was converted into an interface namedObjectMapper, the main implementation isObjectMapperUsingReflection. - The
PropertyDefintionclass was renamed toPropertyHydrationDefinitionto be symmetrical with the newPropertySerializationDefinition. - The
DefinitionProvider::provideDefinitionmethod was deprecated in favour of the newprovideHydrationDefinitionfor symmetry withprovideSerializationDefinition. - The
KeyFormatterinterface was changed by adding akeyToPropertyNamemethod, needed for serialization. - The
ObjectHydrator::hydrateObjectsreturn type class was renamed fromListOfObjectstoIterableList.
- The
ObjectMapperinterface was introduced, which represents both generated and reflection based mappers. - [Major Feature] Serialization was added to the main
ObjectHydratorinterface. - Array hydration now also has rudimentary support for docblock type hints (
@param Type[] $name,@param array<Type> $name,@param array<string, Type> $name).
- Allow same hydrator to be used with different constructor options.
- Added ability to define nested input (#12)
- Added
hydrateObjects; a way to hydrate a list of objects in one go
- Initial implementation of the object hydrator