Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
1a6e2e3 to0478eb0Comparesrc/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Encoder/JsonEncoderContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Encoder/XmlEncoderContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
0478eb0 toc86c320Comparesrc/Symfony/Component/Serializer/Context/Encoder/YamlEncoderContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...ymfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
44e5b18 to86b2834Compare86b2834 toabacfdfComparesrc/Symfony/Component/Serializer/Context/AbstractContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/AbstractContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/AbstractContextBuilder.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
dunglas left a comment
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
c2739a4 tobe6b0aaComparebe6b0aa to65af0d9CompareUh oh!
There was an error while loading.Please reload this page.
65af0d9 to48f7b82Compare
chalasr left a comment
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 tof1b078cComparechalasr commentedFeb 2, 2022
Thank you@mtarld. |
…mtarld)This PR was merged into the 6.1 branch.Discussion----------[Serializer] Add context builders documentationRelated tosymfony/symfony#43973Closessymfony#16470Commits-------7be3c93 [Serializer] Add context builders documentation
Uh oh!
There was an error while loading.Please reload this page.
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(maybebuildis better?) can be called to generate the actual serialization context.For example: