-
-
Notifications
You must be signed in to change notification settings - Fork 918
Fix BC-break when using short-syntax notation for access_control #3113
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This must target |
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']);
} |
You should cherry pick your commit. We don't want the commits from |
073fb29
to
8e2a850
Compare
I know it was ongoing ;) |
8e2a850
to
ae79ac8
Compare
I've updated the test to add
|
288c1a7
to
320316a
Compare
thanks @antograssiot ! |
This BC-break as introduced in #2992
When using the
accesControl
attribute directly in the ApiRessource annotation, theAttributeHydratorTrait
would throw the following:core/src/Annotation/AttributesHydratorTrait.php
Lines 54 to 56 in 9799193