0.4.0
What's Changed
Added
- The
ObjectMapper
interface was introduced, which represents both generated and reflection based mappers. - [Major Feature] Serialization was added to the main
ObjectHydrator
interface. - Array hydration now also has rudimentary support for docblock type hints (
@param Type[] $name
,@param array<Type> $name
,@param array<string, Type> $name
).
Deprecations
- The
ObjectHydrator
class was deprecated, useObjectMapperUsingReflection
and hint against the newObjectMapper
interface. - The
ListOfObjects
class was deprecated, use theIterableList
object instead. - The
KeyFormattingWithoutConversion
class was deprecated, use theKeyFormatterWithoutConversion
class instead.
Breaking Changes
- The
ObjectHydrator
class was converted into an interface namedObjectMapper
, the main implementation isObjectMapperUsingReflection
. - The
PropertyDefintion
class was renamed toPropertyHydrationDefinition
to be symmetrical with the newPropertySerializationDefinition
. - The
DefinitionProvider::provideDefinition
method was deprecated in favour of the newprovideHydrationDefinition
for symmetry withprovideSerializationDefinition
. - The
KeyFormatter
interface was changed by adding akeyToPropertyName
method, needed for serialization. - The
ObjectHydrator::hydrateObjects
return type class was renamed fromListOfObjects
toIterableList
.
Full Changelog: 0.3.1...0.4.0