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] Fixedarray_unique on array of objects ingetAllowedAttributes.#16450

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

Closed
ksm2 wants to merge5 commits intosymfony:masterfromksm2:ticket_16445

Conversation

@ksm2
Copy link
Contributor

@ksm2ksm2 commentedNov 3, 2015

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#16445
LicenseMIT
Doc PRsymfony/symfony-docs#16445

@jakzal
Copy link
Contributor

Can you add a test case?

Copy link
Contributor

Choose a reason for hiding this comment

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

This could be inlined:

return$attributesAsString ?array_unique($allowedAttributes) :$allowedAttributes;

@dunglas
Copy link
Member

IMO$attributesAsString can just be deleted:#16445 (comment)

@fabpot
Copy link
Member

IIUC, thearray_unique can be removed altogether? If that's the case, let's do that.

@dunglas
Copy link
Member

It can with the metadata implementation provided in Symfony.

+1 for removing the call and adding a mention in the metadata interface that it's the responsibility of the implantation to return an uniquified list of attributes.

@fabpot
Copy link
Member

@CornyPhoenix What's the status of this PR?

@ksm2
Copy link
ContributorAuthor

ksm2 commentedDec 6, 2015

@fabpot I am sorry for the late response. I removed thearray_unique statement. Also I added a mention in theClassMetadataInterface that the stored attribute metadata is a set, not a list, containing not more than one object per attribute.

@dunglas
Copy link
Member

👍

@fabpot
Copy link
Member

@dunglas Which version should we merge this PR in?

@dunglas
Copy link
Member

2.7 IMO but not sure. I'll take a look and merge it.

@fabpot
Copy link
Member

Thank you @CornyPhoenix.

fabpot added a commit that referenced this pull requestDec 8, 2015
…getAllowedAttributes`. (CornyPhoenix)This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#16450).Discussion----------[Serializer] Fixed `array_unique` on array of objects in `getAllowedAttributes`.| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#16445| License       | MIT| Doc PR        |symfony/symfony-docs#16445Commits-------6110bd9 [Serializer] Fixed  on array of objects in .
@fabpotfabpot closed thisDec 8, 2015
@ewgRa
Copy link
Contributor

This PR was merged in 2.7, that require "php": ">=5.3.9" but in PR used short array syntax [] at tests and it is intoroduced at 5.4

@fabpot Is it ok, or must be fixed by another PR?

@jakzal
Copy link
Contributor

@ewgRa short syntax should be removed. Fancy a PR? :)

@ewgRa
Copy link
Contributor

@jakzal Sure, I hope PR author ok with that.

#16921

This was referencedDec 26, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@ksm2@jakzal@dunglas@fabpot@ewgRa@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp