Skip to content

BUG: EntityPrivilegeExpressionEvaluator accesses undefined property #3395

@robert-heinig

Description

@robert-heinig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions