Skip to content

3.1.0

Choose a tag to compare

@magicsunday magicsunday released this 04 Oct 22:16
· 7 commits to main since this release
3.1.0

Added

  • #[XmlIgnore] keeps a property out of the XML. It is checked before the property is read, so neither the field nor a custom type converter is touched.
  • addType() accepts a fully qualified class or interface name and matches it before the object catch-all, so a converter can target one value object.
  • CircularReferenceException: map() stops with it on a cyclic object graph instead of recursing without bound. The message names the property path that closes the cycle.
  • InvalidXmlValueException: map() refuses a value that XML 1.0 cannot carry (a character below the space other than tab, line feed and carriage return, U+FFFE, U+FFFF, or a string that is not valid UTF-8). The message names the property path.

Fixed

  • Values containing an ampersand are no longer corrupted when written through the element path.
  • map() is repeatable. Every call builds a fresh document.
  • A typed property that was never assigned is skipped like a null value instead of raising an Error.
  • A write-only virtual property (PHP 8.4, a set hook without a get hook) is skipped instead of raising an Error.
  • A static property is no longer encoded as state of the object.
  • Documentation corrected where it described behaviour the code does not implement. The documented extractor setup now lists both extractors for the types.

Changed

  • Dropped the unused symfony/property-access requirement. A project that uses it directly must require it itself.
  • Behaviour to be aware of: a string that contains a character XML 1.0 forbids, or that is not valid UTF-8, now raises InvalidXmlValueException instead of producing a document that cannot be parsed. A public static property that used to appear in the XML no longer does.

Internal

  • Development tooling moved to the shared magicsunday/coding-standard ruleset, including the Deptrac architecture layers.