Skip to content

2.0.0

Choose a tag to compare

@magicsunday magicsunday released this 12 Jun 07:24
· 66 commits to main since this release
2c11fd3

⚠️ Breaking changes

  • Dropped Symfony 6 support. symfony/property-info and symfony/property-access now require ^7.3 || ^8.0.
  • Added symfony/type-info as a required dependency — the encoder was migrated from the legacy type resolution to symfony/type-info.
  • The supported PHP range is now open-ended (^8.2), covering PHP 8.5.

✨ Features

  • Native PHP 8 attribute syntax for the property markers: #[XmlAttribute], #[XmlNodeValue], #[XmlCDataSection] — usable interchangeably with the existing Doctrine docblock annotations (@XmlAttribute, …).

🐛 Fixes

  • Correctly encode collections whose value type is a union of object types (and mixed scalar/object unions) by routing each entry on its runtime value instead of the static union type.

⚡ Performance

  • Memoize the resolved property markers per class property and cache the Doctrine annotation reader across property checks, eliminating redundant reflection and docblock parsing.

🔧 Maintenance

  • PHPStan raised to max level (no baseline).
  • Tested against PHPUnit 11 / 12 / 13 (PHP 8.2 → 11, 8.3 → 12, 8.4/8.5 → 13).
  • Development tooling aligned with magicsunday/jsonmapper (jscpd copy-paste gate, centralised caches); CI extended to PHP 8.5.