Skip to content

Drop support for privileged advices for PHP7.0 #247

@lisachenko

Description

@lisachenko

See http://www.serverphorums.com/read.php?7,1316242,1323570 by @nikic for additional information.

This changeset forbids rebinding the scope of closures returned by
getClosure() completely. The background of this change is that PHP 7
includes optimizations that early-bind the scope of self:: during
compilation (and there are more optimizations of this nature pending to
land in PHP 7.1). This means that attempts to change the meaning of "self"
in an ordinary method at runtime will not always succeed and lead to
inconsistent results.

This prevents running the advice in the form of aspect's method in privileged mode with access to private parts of target object.

Related to the #175

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions