-
-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Labels
Milestone
Description
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