Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Serializer] Deprecate XML configuration format#61287

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

Conversation

@MatTheCat
Copy link
Contributor

@MatTheCatMatTheCat commentedJul 31, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?no
Deprecations?yes
IssuesN/A
LicenseMIT

Split from#60568

@MatTheCat
Copy link
ContributorAuthor

high-deps failure seems related to#61101; how could it be fixed?

@MatTheCatMatTheCatforce-pushed thedeprecate_serializer_xml_loader branch 3 times, most recently from2422e54 toed71ee6CompareAugust 4, 2025 07:47
@MatTheCatMatTheCatforce-pushed thedeprecate_serializer_xml_loader branch 2 times, most recently fromf95c212 toa0ad8e3CompareAugust 20, 2025 12:58
@MatTheCatMatTheCatforce-pushed thedeprecate_serializer_xml_loader branch froma0ad8e3 to600e7a3CompareAugust 26, 2025 11:10
@MatTheCatMatTheCatforce-pushed thedeprecate_serializer_xml_loader branch from600e7a3 toe08eeeaCompareSeptember 3, 2025 16:44
nicolas-grekas added a commit that referenced this pull requestSep 3, 2025
…-time serialization metadata (nicolas-grekas)This PR was merged into the 7.4 branch.Discussion----------[Serializer] Allow using attributes to declare compile-time serialization metadata| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | no| New feature?  | yes| Deprecations? | yes| Issues        | -| License       | MITVery close to#61528Prerequisite for#61287At the moment, serialization attributes are read at runtime when `framework.serialization.enable_attributes` is true.This means they don't fit for bundles nor can't they be warmed up.This PR fixes both issues by using a new `serializer.attribute_metadata` resource tag, that's turned into a list of classes to parse for attributes at compile-time.For bundles and for apps, the tag is added by explicit service configuration:```php        ->set('my_bundle.api_resource.product', Product::class)            ->resourceTag('serializer.attribute_metadata')```Unlike validation where we have constraint attributes to auto-discover service resources, serialization doesn't have any corresponding hooks. We do have a few like `#[DiscriminatorMap]` of `#[Groups]`, but relying on those would miss many more classes that are meant for serialization. Maybe we could introduce an attribute that'd hint that some class is serializable by the component (and require the attribute at some point in the future?)Commits-------bc6e054 [Serializer] Allow using attributes to declare compile-time serialization metadata
@nicolas-grekas
Copy link
Member

Let me close for reasons explained in#61288 (comment).
A big thank you for pushing this forward, it made us realize that we have some more steps ahead before being able to deprecate.
But I definitely want to reconsider on 8.x!

MatTheCat reacted with thumbs up emoji

@MatTheCatMatTheCat deleted the deprecate_serializer_xml_loader branchSeptember 4, 2025 15:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

7.4

Development

Successfully merging this pull request may close these issues.

3 participants

@MatTheCat@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp