[7.0] Support full payload for concrete resolver #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces updates to the
Hydratorclass and related components to support additional contextual data during object hydration. It also updates dependencies and adds new test coverage for the changes. The most significant changes include modifications to method signatures, enhancements to the hydration process, and updates to the test suite.Updates to Dependencies:
phpunit/phpunitincomposer.jsonto version^10for compatibility with the latest PHPUnit features.Enhancements to Hydration Process:
array $additionalparameter to multiple methods in theHydratorclass, includinghydrate,initializeObject,hydrateProperty, and others, to allow passing additional contextual data during hydration. [1] [2] [3]hydrateObjectsInArraymethod to propagate theadditionalparameter when recursively hydrating nested objects.propertyFromInstanceandpropertyArraymethods to utilize theadditionalparameter during object hydration. [1] [2]Changes to Abstract Resolvers:
concreteFormethod in theConcreteResolverabstract class to accept an additionalarray $allparameter, enabling more contextual decision-making when resolving concrete implementations. [1] [2]Test Suite Enhancements:
testHydrateAbstractPropertyWithAdditional, to validate the behavior of theHydratorclass when using theadditionalparameter during object hydration.ObjectWithAbstractfixture to include a newnameproperty for testing purposes.