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
[Serializer] Add context builders #43973
Merged
Merged
+2,371
−7
Conversation
This file contains 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
1a6e2e3
to
0478eb0
dunglas
requested changes
Nov 9, 2021
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/Encoder/JsonEncoderContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/Encoder/XmlEncoderContextBuilder.php
Outdated
Show resolved
Hide resolved
0478eb0
to
c86c320
dunglas
reviewed
Nov 11, 2021
src/Symfony/Component/Serializer/Context/Encoder/YamlEncoderContextBuilder.php
Outdated
Show resolved
Hide resolved
ismail1432
reviewed
Nov 11, 2021
ismail1432
reviewed
Nov 11, 2021
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
Show resolved
Hide resolved
...ymfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.php
Show resolved
Hide resolved
44e5b18
to
86b2834
86b2834
to
abacfdf
dunglas
approved these changes
Dec 25, 2021
src/Symfony/Component/Serializer/Context/AbstractContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/AbstractContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/AbstractContextBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php
Show resolved
Hide resolved
abacfdf
to
a2bf307
dunglas
requested changes
Jan 9, 2022
src/Symfony/Component/Serializer/Context/ContextBuilderTrait.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Serializer/Context/ContextBuilderTrait.php
Outdated
Show resolved
Hide resolved
c2739a4
to
be6b0aa
welcoMattic
approved these changes
Jan 10, 2022
be6b0aa
to
65af0d9
dunglas
reviewed
Jan 10, 2022
65af0d9
to
48f7b82
16 tasks
chalasr
reviewed
Jan 26, 2022
48f7b82
to
f1b078c
chalasr
approved these changes
Jan 26, 2022
dunglas
approved these changes
Feb 2, 2022
Thank you @mtarld. |
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.
This PR introduces ContextBuilders as discussed in #30818.
The main idea here is to introduce an abstract context builder that could be extended to create concrete context builders.
These context builders will allow serialization context construction using withers (maybe setters are better?) while providing validation, documentation, and IDE autocompletion.
Once construction is ready,
toArray
(maybebuild
is better?) can be called to generate the actual serialization context.For example:
The text was updated successfully, but these errors were encountered: