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] Return an ArrayObject for empty collection objects when PRESERVE_EMPTY_OBJECTS is set#42730

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

Merged
fabpot merged 1 commit intosymfony:5.4fromnicolas-grekas:ser-fix
Aug 25, 2021

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

In#42619, we tried adding a BC layer for this behavior change, but when reviewing#42699, I figured out there is no possible BC layer: userland implementations (eg an entity returning an empty doctrine collection) won't extend ArrayObject because we ask them to do so.

I therefor propose to return an ArrayObject as of 5.4, relying on the intuition that this should not have much BC impact in practice.

/cc@lyrixx

Copy link
Member

@lyrixxlyrixx left a comment

Choose a reason for hiding this comment

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

👍🏼

@lyrixx
Copy link
Member

CHANGELOG.md must be updated

@nicolas-grekasnicolas-grekas changed the title[Serializer] Always return an ArrayObject for empty collection objects[Serializer] Return an ArrayObject for empty collection objects when PRESERVE_EMPTY_OBJECTS is setAug 25, 2021
@nicolas-grekas
Copy link
MemberAuthor

CHANGELOG updated

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit2310fc8 intosymfony:5.4Aug 25, 2021
@nicolas-grekasnicolas-grekas deleted the ser-fix branchAugust 25, 2021 16:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@lyrixxlyrixxlyrixx approved these changes

@chalasrchalasrchalasr approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@lyrixx@fabpot@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp