Uh oh!
There was an error while loading. Please reload this page.
Fix BC-break when using short-syntax notation for access_control - #3113
Merged
Conversation
teohhanhui
approved these changes
Sep 27, 2019
teohhanhui
commented
Sep 27, 2019
Contributor
This must target |
antograssiot
commented
Sep 27, 2019
ContributorAuthor
another option would be to update directly the AttributeExtractorTrait with something like, it would allow to trigger proper deprecation, WDYT ? if (array_key_exists('accessControl', $values)) {
$values['security'] = $values['accessControl'];
@trigger_error('Attribute "accessControl" is deprecated in annotation since API Platform 2.5, prefer using "security" attribute instead', E_USER_DEPRECATED);
unset($values['accessControl']);
}
if (array_key_exists('accessControlMessage', $values)) {
$values['securityMessage'] = $values['accessControlMessage'];
@trigger_error('Attribute "accessControlMessage" is deprecated in annotation since API Platform 2.5, prefer using "securityMessage" attribute instead', E_USER_DEPRECATED);
unset($values['accessControlMessage']);
} |
teohhanhui
commented
Sep 27, 2019
Contributor
You should cherry pick your commit. We don't want the commits from |
antograssiotforce-pushed
the
security-bc-break
branch
from
September 27, 2019 09:08
073fb29 to
8e2a850Compareantograssiot
commented
Sep 27, 2019
ContributorAuthor
I know it was ongoing ;) |
antograssiotforce-pushed
the
security-bc-break
branch
from
September 27, 2019 11:52
8e2a850 to
ae79ac8Compareteohhanhui
approved these changes
Sep 27, 2019
antograssiot
commented
Sep 27, 2019
ContributorAuthor
I've updated the test to add |
antograssiotforce-pushed
the
security-bc-break
branch
from
September 27, 2019 12:45
288c1a7 to
320316aComparesoyuka
commented
Sep 27, 2019
Member
thanks @antograssiot ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This BC-break as introduced in #2992
When using the
accesControlattribute directly in the ApiRessource annotation, theAttributeHydratorTraitwould throw the following:core/src/Annotation/AttributesHydratorTrait.php
Lines 54 to 56 in 9799193