php-aop
php-aop copied to clipboard
PHP-AOP is a library that adds aspect oriented programming capabilities to PHP.
Using [Code Transformers](https://github.com/okapi-web/php-code-transformer) with Aspects has some problems. ##### Note: Transformers are always executed before Aspects. Example of why it is incompatible: ```php class Target { public function answer(): int...
I have a Class `GroupMemberService` which is Proxied by php-aop. In its constructor the class `GroupPolicy` is passed which is also proxied. I use DI to inject the constructor params....
I have some php code that looks like this: ``` public function checkInternalGroupPermissionForPerson(string $auth, ?int $personId) { include_once dirname(__DIR__, 3) . '/churchdb/churchdb_db.php'; $groups = getMyGroupIdsWhereIAmAllowed($auth); $personIds = churchdb_getAllPeopleIdsFromGroups($groups); return isset($personIds[$personId]);...
Maybe a protected method in the kernel that allows to add custom logic for dependency injection when instantiating new aspects
Commit: https://github.com/okapi-web/php-aop/pull/67/commits/f9a56b4680310ad934a7354be096202b8b346cab
Commit: https://github.com/okapi-web/php-code-transformer/commit/97ccbe9d6df42046d2e87f39abf1a328ff091ec0
See https://github.com/okapi-web/php-code-transformer/issues/12
See https://github.com/okapi-web/php-code-transformer/issues/13 When an aspect is changed, the cache state should be invalidated, but if a `EmptyResultCacheState` is present, it won't be invalidated. We should probably create the hash from...
I have added some performance benchmarks with various conditions. --- ### Numbers test The basic test consists of a `Numbers` class with the property `int $number = 0` and the...
Imagine a method inside the vendor folder that has 20 nested `if`-statements inside one method and you don't want to intercept and copy the whole method and add your change;...