8000 [Serializer] Add xml context option to ignore empty attributes by qdequippe · Pull Request #58599 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Serializer] Add xml context option to ignore empty attributes #58599

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 t 8000 o 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 1 commit into from
Jan 17, 2025

Conversation

qdequippe
Copy link
Contributor
Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues
License MIT

Sometimes XML attributes are optional and should not be present in the serialized data.

This PR adds the option to skip empty attributes (null or empty) during encoding.

@qdequippe qdequippe requested a review from dunglas as a code owner October 18, 2024 13:24
@carsonbot carsonbot added this to the 7.2 milestone Oct 18, 2024
@carsonbot carsonbot changed the title Add xml context option to ignore empty attributes [Serializer] Add xml context option to ignore empty attributes Oct 18, 2024
8000 @fabpot fabpot modified the milestones: 7.2, 7.3 Nov 20, 2024
@fabpot fabpot force-pushed the xml-empty-attribute-option branch from c9f5088 to d011981 Compare January 17, 2025 07:28
@fabpot
Copy link
Member
fabpot commented Jan 17, 2025

Thank you @qdequippe.

@fabpot fabpot merged commit 56c211e into symfony:7.3 Jan 17, 2025
3 of 11 checks passed
8000
7.3
---

* Deprecate the `CompiledClassMetadataFactory` and `CompiledClassMetadataCacheWarmer` classes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in the CHANGELOG looks unrelated 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mention that I fixed it in the next commit. My bad, sorry.

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Jan 21, 2025
…uippe)

This PR was submitted for the 7.2 branch but it was squashed and merged into the 7.3 branch instead.

Discussion
----------

[Serializer] Documentation for xml empty attribute

Add documentation for symfony/symfony#58599

Commits
-------

0776cba [Serializer] Documentation for xml empty attribute
@fabpot fabpot mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0