php-aop icon indicating copy to clipboard operation
php-aop copied to clipboard

Complex Advice Types for intercepting Code Structures and Statements

Open WalterWoshid opened this issue 2 years ago • 0 comments

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; or fork the project just for one small little change. This is what I really hate about programming sometimes and with my idea it would be possible to even intercept code structures and statements with a nice and beautiful syntax.


Questions and Answers

Q: Why would you even use a library, that has 20 nested if-statements? A: Because sometimes there is no alternative and one specific design choice of the library isn't just suitable for some peoples use-cases.

Q: Wouldn't that mean random behavior that could not be really tracked? A: Either use Explicit Aspects or wait for the IDE plugins: LSP / PhpStorm / VsCode

WalterWoshid avatar Sep 10 '23 23:09 WalterWoshid