Modern way of rewriting lib files

Decided to implement Go! AOP framework in Magento.

See Danslo_Aop on github.


Go the AOP route and use a PHP-based library like Go! AOP: Last I checked this will require Magento classes to be loaded by the composer autoloader, not just one being available. Flyingmana has done some work in this area but it's definitely not ready for production usage and my needs are more immediate. I also want to ship as an extension, and that would require more composer setup.

I want to add that Go! AOP framework can work without composer, I can help with configuration (just create an issue on github for that). Composer is needed only for transparent integration with modern applications.

Just replace an include $filename or require $filename in your bootstrap with include FilterInjectorTransformer::rewrite($filename) and configure an autoloader for Go! AOP itself.

Tags:

Core

Overrides