All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.3.0 - 2025-01-21
- Composer
- Allow PHP 8.4
- Allow benmorel/weakmap-polyfill:^0.5.0
- Rules
ArrayShapeRule
- allows processing of arrays with predefined keys
- Processing
Processor
-reset()
method for resetting to initial state (clearing meta cache)
- Metadata
- Improved accuracy of metadata-related error messages
ReflectorMetaSource
is marked as@internal
- Check that
Callback
returns correctArgs
class type - Callbacks in
NodeRuntimeMeta
are grouped by type (performance optimization)
- Callbacks
- receive
FieldContext
(callback-specific) instead ofFieldContext
andObjectContext
instead ofMappedObjectContext
- are not called via closure binding when public
- receive
- Contexts
TypeContext
,MappedObjectContext
andFieldContext
replaced withServicesContext
,DynamicContext
,PropertyContext
,FieldContext
(for callbacks) andObjectContext
(callback-specific)- performance and memory optimization to significantly reduce number of created objects
ArgsContext
renamed toMetaContext
- added child class
MetaFieldContext
with access to property's default value
- added child class
- Rules
Rule
- accepts
ServicesContext
,DynamicContext
andPropertyContext
instead ofTypeContext
andFieldContext
- accepts
MetaFieldContext
instead ofArgsContext
- all rules initialize
Type
lazily (performance optimization)
- accepts
ArrayOfRule
- check during metadata parsing that default value is an array when
mergeDefaults
is enabled
- check during metadata parsing that default value is an array when
ArrayOfRule
,ListOfRule
- skip 2nd and 3rd validation phase for item rules that don't require it
- pass values with keys included to phase 2 (previously keys were stripped)
MultiValueEfficientRule
- renamed to
PhasedRule
- renamed to
MultiValueEfficientRuleAdapter
- renamed to
PhasedRuleAdapter
- marked as internal
- renamed to
- Types
ArrayShapeType
getFields()
always returns the same instances
- Processing
DefaultProcessor
- creates
MappedObjectType
only when necessary (performance optimization) - automatic meta cache reset after main
process()
call (performance optimization) replaced withreset()
method - properties are not set/unset via closure binding when public
- call
unset()
for mapped object properties only inRequiredFields::none()
mode (performance optimization)
- creates
Skipped
modifier and the related code - it was an undocumented feature that is no longer necessary
0.2.0 - 2024-06-22
- Allow PHP 8.3
- Ensure metadata are defined in scope of
MappedObject
- Conflicting field name exception reports error in source property instead of context property
- Conflicting field name exception reports in which class did the conflict occur
- Check that
Rule
returns expected type ofArgs
0.1.0 - 2023-07-07
Initial release