All notable changes to data-transfer-object
will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
- PHP 8.4 compatibility
- Tests moved to GitHub actions
- WITH_DEFAULTS flag to explicitly request default values
- toArrayWithDefaults
- toJsonWithDefaults
- makeFromJson
- DataTransferObject::isDefined support for nested array, object and ArrayAccess
- Custom / default casting system
- Property and isDefined references
- DataTransferObject::assertUndefined DataTransferObject::assertOnlyDefined
- DataTransferObject::isUndefined
- Shortened stack trace for nested DTO exceptions
- Default flags renamed to base flags and default to NONE
- DTOs never set default values unless explicitly requested
- Simple default flags eg cast array to empty array moved to implicit behaviour
- Exception names and messages
- Unused NULLABLE flag
- Unused NOT_NULLABLE flag
- Now implicit DEFAULT_NULL_TO_NULL
- Now implicit DEFAULT_ARRAY_TO_EMPTY_ARRAY
- Now implicit DEFAULT_BOOL_TO_FALSE
- Deprecated DataTransferObject::getProperties()
- DataTransferObject::remake, remakeOnly, remakeExcept helper methods
- DataTransferObject::assertDefined
- Store unknown properties
- DataTransferObject::getProperties() use getDefinedProperties or getPropertiesWithDefaults instead
- makeRecord
- makePick
- makeOmit
- makeExclude
- makeExtract