-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Add context builders #43973
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
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
1a6e2e3
to
0478eb0
Compare
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
Compare
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
Compare
86b2834
to
abacfdf
Compare
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
dunglas
requested changes
Jan 9, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good DX improvement! This also needs a rebase.
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
Compare
welcoMattic
approved these changes
Jan 10, 2022
be6b0aa
to
65af0d9
Compare
dunglas
reviewed
Jan 10, 2022
65af0d9
to
48f7b82
Compare
16 tasks
chalasr
reviewed
Jan 26, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtarld Can you rebase?
48f7b82
to
f1b078c
Compare
chalasr
approved these changes
Jan 26, 2022
dunglas
approved these changes
Feb 2, 2022
Thank you @mtarld. |
Merged
javiereguiluz
added a commit
to javiereguiluz/symfony-docs
that referenced
this pull request
Apr 26, 2022
…mtarld) This PR was merged into the 6.1 branch. Discussion ---------- [Serializer] Add context builders documentation Related to symfony/symfony#43973 Closes symfony#16470 Commits ------- 7be3c93 [Serializer] Add context builders documentation
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.
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: