laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 31 forks source link

[Proposal] Support AOP with php8 Attribute #2654

Open biiiiiigmonster opened 3 years ago

biiiiiigmonster commented 3 years ago

With the introduction of Attribute in php8, will laravel implement AOP based on this?

As far as I know, AOP implementation mechanism in other languages (java) is proxy mechanism, but it seems rude based on the traditional php-fpm mode, and it may also cause some performance loss.

However, AOP can make the code more elegant, which is very consistent with the style of laravel. And with the laravel/octane, the performance loss will no longer affect. If laravel/octane can become the mainstream in the future, AOP will also help better!