Go! is a PHP 5.4 library that allows developers to add support for aspect-oriented programming (AOP) to their PHP applications. It doesn't require PECL extensions, Runkit, evals, or DI containers. The code with weaved aspects is fully readable and native, and can be easily debugged with XDebug. You can debug either classes or aspects. It can potentially be installed in every PHP application because you don't have to change the application source code at all. As an example, with the help of 10-20 lines of code it is possible to intercept all of the public, protected, and static methods in all classes of an application, and display the name and the arguments of each method during its execution.
|Tags||aop PHP aspect-oriented programming oop|
|Implementation||PHP 5.3 +|
Release Notes: Privileged advice for aspect allows you to access private and protected properties and methods of objects inside advice. Better integration with composer. "True" pointcut references give the ability to compose a complex pointcut from a simple pointcuts. Pointcut now accepts "$this" in references to point to the current aspect instance. Intercepting system functions such as fopen(), file_get_contents(), etc. An annotation property pointcut was added. The ability to declare multiple interfaces and/or traits with single DeclareParent. A DeclareError interceptor was added.
Release Notes: This release supports dynamic pointcuts, a pointcut which matches a specific point in the code, if it is under the control flow (look at AspectJ cflow and cflowbelow). It makes some performance optimizations (shared services and lazy loading). Pointcuts use case-sensitive matching and can be combined into the complex pointcut with the help of primitive pointcuts (&&, ||, !). There are changes in the kernel configuration (look at the demo for appLoader and autoloadPaths).
Release Notes: Intercepting methods in traits was added. This release implements pointcut parser/grammar for custom expressions. It has huge pointcuts refactoring and code cleanup. The kernel has been rewritten to use lazy loading for services and pointcuts.
Release Notes: This release adds introduction advice support. It fixes a bug with composer autoloader prepending. It fixes a doctrine/common dependency: >=2.0.0, <2.4.0.
Release Notes: Initial release.