Skip to content

0.9.0

Compare
Choose a tag to compare
@flaksp flaksp released this 10 Mar 19:33
· 61 commits to main since this release
57d0c01

New features:

  • New denormalizer: ObjectPropertyDenormalizer (it's experimental API!).
  • Internal and external APIs are fully covered with Psalm and PHPStan types.

Breaking changes:

  • Minimum supported version of PHP is 8.1 now.
  • Method ObjectDenormalizer::denormalizeStaticFields was renamed to ObjectDenormalizer::denormalize. The third argument now accepts array instead of ObjectStaticFields object. ObjectStaticFields class was removed.
  • Method ObjectDenormalizer::denormalizeDynamicFields was removed with ObjectDiscriminatorFields class. Constraint violation WrongDiscriminatorValue is removed too.
  • ConstraintViolationCollection was removed. It was replaced with an array of ConstraintViolationInterface everywhere.
  • Constant WrongPropertyType::JSON_TYPE_INTEGER was renamed to WrongPropertyType::JSON_TYPE_NUMBER. Its value was changed to number too.

Bug fixes:

  • Method WrongPropertyType::guessGivenType() now distinguishes between JSON arrays and JSON objects. Previously, it always reported both data types as WrongPropertyType::JSON_TYPE_ARRAY.
  • In rare cases WrongPropertyType::guessGivenType() could fail because it used variable with mixed type in concatenation when throwed exception.