-
-
Notifications
You must be signed in to change notification settings - Fork 921
Merge 2.5 #3571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Merge 2.5 #3571
+987
−298
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
alanpoulain
commented
May 18, 2020
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tickets | N/A |
License | MIT |
Doc PR | N/A |
In `ApiPlatform\Core\DataTransformer\DataTransformerInterface` there is a comment that states that DTOs should be allowed to return the same original object if no transformation is done. This resulted in missing LD data. (No @id, @context etc.). ```php /** * Transforms the given object to something else, usually another object. * This must return the original object if no transformation has been done. * * @param object $object * * @return object */ public function transform($object, string $to, array $context = []); ``` This update checks if the output class is the same as the original, and if so populated the extended metadata in the JsonLd\ItemNormalizer as it would not be added using the JsonLd\ObjectNormalizer
When a DataTransformer returns the original resource as a fallback, a context key is set so when repeating the serialization/normalization we can populate the extended jsonld data
Previous push reverted a change which is beneficial to performance. Instead of re-looping over the serializer/normalizers, if the DTO output class is defined as the same as the resource, we can detect this in the 1st round of serialization
…ted class from PropertyInfo extractor
…some modified data if needed
…set no matter how the same class/object is returned
- Prevent BC change on AbstractItemNormalizer::transformOutput - Remove useless documentation
…rmalization-2 Fix ramsey uuid denormalization api-platform#3473
`src/Serializer/AbstractItemNormalizer.php`: Update constant name Change author phpdoc on test documents and entities
This reverts commit 57ec463.
Revert "Passing custom doctrine type to addWhereByStrategy"
…put-class-same-as-original Bug Fix: DataTransformer returning same class as original should include JSONLD Data
* Fix: Allow objects without properties * Refactor tests Co-authored-by: Andreas Möller <[email protected]> * Fix: CS * Add testcases Co-authored-by: Andreas Möller <[email protected]>
Changelog 2.5.6
…supports-string fix: Uuid identifier normalizer should support only strings
* Handle deprecations from Doctrine Inflector. * Move Inflector to Util Co-authored-by: Kévin Dunglas <[email protected]>
Fix --prefer-lowest tests
* Support for Mercure 0.10 * Fix linters * Fix testPublishUpdate
Add changelog for v2.5.6
01a3d4a
to
249a222
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.