Skip to content
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

BUG: EntityPrivilegeExpressionEvaluator accesses undefined property #3395

Open
1 task done
robert-heinig opened this issue Sep 19, 2024 · 0 comments
Open
1 task done
Labels

Comments

@robert-heinig
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When \Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\EntityPrivilegeExpressionEvaluator::evaluate is executed and deprecations are part of the logged errors, this error occrus:

Creation of dynamic property Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\EntityPrivilegeExpressionEvaluator::$newExpressions is deprecated in /var/www/html/Data/Temporary/Production/SubContextBehat/Cache/Code/Flow_Object_Classes/Neos_Flow_Security_Authorization_Privilege_Entity_Doctrine_EntityPrivilegeExpressionEvaluator.php line 45

Expected Behavior

There is no deprecation error message.

Steps To Reproduce

No response

Environment

- Flow: 8.3
- PHP: 8.3

Anything else?

This problem is a regression of this commit.
The use of the property newExpressions was not renamed in the extending class.

The implementation of the code generation differs between extended and extending class. Since EntityPrivilegeExpressionEvaluator does not use the expression cache but instead checks the function existence directly, I think the line
$this->newExpressions[$functionName] = $functionDeclaration;
should be removed completely instead of renaming newExpressions to evaluatedExpressions.

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

No branches or pull requests

1 participant