Skip to content

[Security] Remove mention of is_granted_ $field argument #20544

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

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

smnandre
Copy link
Member

@smnandre smnandre commented Jan 8, 2025

The third argument of is_granted / is_granted_for_user is undocumented (except on this page) (neither on Symfony docs, code, nor on... Symfony ACL Bundle docs).

It must be kept and maintained for BC reasons. But it can be missleading/frustrating to show this argument to users, when they cannot use it with a standard/recommended Symfony installation.

And if they just test it, the error could lead them to believe the AclBundle needs to be installed to use the is_granted function(s).

As suggested in symfony/symfony#59282 (comment) I believe "not showing it" is the "best" solution here.

The third argument of is_granted / is_granted_for_user is undocumented (except on this page) (neither on Symfony docs, code, nor on... Symfony ACL Bundle docs).

It must be kept and maintained for BC reasons. But it can be missleading/frustrating to show this argument to users, when they cannot use it with a standard/recommended Symfony installation.

And if they just test it, the error could lead them to believe the AclBundle needs to be installed to use the `is_granted` function(s).

As suggested in symfony/symfony#59282 (comment) I believe "not showing it" is the "best" solution here.
@javiereguiluz
Copy link
Member

Well explained! Thanks Simon.

@javiereguiluz javiereguiluz merged commit 66c0fd4 into symfony:7.3 Jan 8, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants