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] 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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ksm2 commentedNov 3, 2015
| 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#16445 |
jakzal commentedNov 3, 2015
Can you add a test case? |
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.
This could be inlined:
return$attributesAsString ?array_unique($allowedAttributes) :$allowedAttributes;
d311645 to3da6f29Comparedunglas commentedNov 4, 2015
IMO |
fabpot commentedNov 7, 2015
IIUC, the |
dunglas commentedNov 7, 2015
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 commentedNov 28, 2015
@CornyPhoenix What's the status of this PR? |
…ts in `getAllowedAttributes`.
… as objects or strings.
…ts in `getAllowedAttributes`.
ksm2 commentedDec 6, 2015
@fabpot I am sorry for the late response. I removed the |
dunglas commentedDec 7, 2015
👍 |
fabpot commentedDec 7, 2015
@dunglas Which version should we merge this PR in? |
dunglas commentedDec 7, 2015
2.7 IMO but not sure. I'll take a look and merge it. |
fabpot commentedDec 8, 2015
Thank you @CornyPhoenix. |
…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 .
ewgRa commentedDec 9, 2015
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 commentedDec 9, 2015
@ewgRa short syntax should be removed. Fancy a PR? :) |