Skip to content

0.4.0

Compare
Choose a tag to compare
@frankdejonge frankdejonge released this 05 Jun 13:45
· 130 commits to main since this release

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, use ObjectMapperUsingReflection and hint against the new ObjectMapper interface.
  • The ListOfObjects class was deprecated, use the IterableList object instead.
  • The KeyFormattingWithoutConversion class was deprecated, use the KeyFormatterWithoutConversion class instead.

Breaking Changes

  • The ObjectHydrator class was converted into an interface named ObjectMapper, the main implementation is ObjectMapperUsingReflection.
  • The PropertyDefintion class was renamed to PropertyHydrationDefinition to be symmetrical with the new PropertySerializationDefinition.
  • The DefinitionProvider::provideDefinition method was deprecated in favour of the new provideHydrationDefinition for symmetry with provideSerializationDefinition.
  • The KeyFormatter interface was changed by adding a keyToPropertyName method, needed for serialization.
  • The ObjectHydrator::hydrateObjects return type class was renamed from ListOfObjects to IterableList.

Full Changelog: 0.3.1...0.4.0