Skip to content

Composition validation of mutable objects

Compare
Choose a tag to compare
@wol-soft wol-soft released this 11 Nov 14:18
· 169 commits to master since this release
2cfe6f6

Backwards incompatible changes

  • Removed dependency to symplify/easy-coding-standard. If you want to use the pretty printing mechanism of the library you need to add the library manually:
composer require --dev symplify/easy-coding-standard

Features

  • PHP8 Compatibility
  • Optimized duplicate class detection by using only relevant fields for calculating the class signature
  • Include object description in class DocBlock

Bugfixes

  • The OpenAPIv3Provider doesn't resolve internal references
  • The method setAdditionalProperty added by the AdditionalPropertiesAccessorPostProcessor doesn't trigger setter hooks
  • Uses for classes from the same namespace
  • Set nullable properties to null via the populate method of the PopulatePostProcessor keeps the old value
  • Property validation of mutable objects which use composition after instantiation (#6)

Internal

  • Don't use array_unique any longer for unique validations (compare https://bugs.php.net/bug.php?id=65208) as it's not type safe
  • Properties added to a schema object (eg. in a post processor) can now be marked as internal properties. Internal properties will be private and rendered without getter and setter methods
  • Setter logic is not executed if the provided value is identical to the already stored value (Value will not be validated, no schema hooks will be called)
    • Also applies to the PopulatePostProcessor
    • Also applies to additional properties added via the setAdditionalProperty added by the AdditionalPropertiesAccessorPostProcessor