10000 [Security] Make Role::$role protected · Issue #23025 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Security] Make Role::$role protected #23025

New issue

8000 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

Closed
vudaltsov opened this issue Jun 1, 2017 · 3 comments
Closed

[Security] Make Role::$role protected #23025

vudaltsov opened this issue Jun 1, 2017 · 3 comments

Comments

@vudaltsov
Copy link
Contributor
vudaltsov commented Jun 1, 2017
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.4

Since Symfony\Component\Security\Core\Role\RoleInterface is deprecated, there is no possibility to create a Role entity anymore. Symfony\Component\Security\Core\Role\Role::$role is private and extending the Role class doesn't allow to add mapping to that property.

I suggest making $role protected. If I am not mistaken this won't break existing child classes.

@linaori
Copy link
Contributor
linaori commented Jun 2, 2017

You can still create a role entity, you just can't store it in your session anymore.

@xabbuh
Copy link
Member
xabbuh commented Jun 3, 2017

By the way, there is a proposal to also deprecate the entire Role class in Symfony 3.4 (see #22048). So you will probably be better off by using strings as roles instead.

@vudaltsov
Copy link
Contributor Author

Got it, thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0