-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Fix invalid deprecation messages in Security constants #48554
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
[Security] Fix invalid deprecation messages in Security constants #48554
Conversation
This is on purpose. The constants will be moved to the new Security helper, and will just reference the ones from |
If the new class relies on inheriting the constants instead of overriding them, any SA tool will report the constants as deprecated on the child class too. |
8b2fb8b
to
3dac1e4
Compare
3dac1e4
to
3fd5a40
Compare
Thanks for confirming. PR updated |
@chalasr yes - that's exactly the case. Besides, some IDEs like PHPStorm discourage from referencing inherited constants by derived class and suggest using the class where the constant was defined. Is there any particular reason we are using |
@IonBazan The |
Thank you @IonBazan. |
This PR changes invalid deprecation message, suggesting to use
\Symfony\Bundle\SecurityBundle\Security::ACCESS_DENIED_ERROR
instead of\Symfony\Component\Security\Core\Security::ACCESS_DENIED_ERROR
, while\Symfony\Component\Security\Http\SecurityRequestAttributes::ACCESS_DENIED_ERROR
should be used.For reference: #47760