Skip to content

[Pointcut] Incorrect matching of static methods with logical or #293

Description

@lisachenko

If combine static modifier with logical or for public|protected members, then pointcut will also match dynamic methods.

* @Around("execution(public|protected **\*->*(*))")
public function aroundMethodExecution(MethodInvocation $invocation)

* @Around("execution(public|protected **\*::*(*))")
public function aroundStaticMethodExecution(MethodInvocation $invocation)

Second expression is translated like this:

(protected && static) || public

It's incorrect, need to check how to fix this error in ModifierMatcherFilter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions