Will Yii-2.0 have Aspect Oriented aproach?

Main question will is will yii be supporting AOP in near future.

Advantages is that features such as Debugging,Loging,Security rules, and other stuff will be written more easily and modification and managing wont be very hard.

in disadvantages there is no adequate tools to manipulate Aspects and Advices for php, maybe in Gii implementing such will solve it.

and then… at last will be possible to use Behavior event in different aspects of features.


it will be splendid if even not fully AOP specification implemented (and in some point its not need due other cool features of Yii-2.0).

if yii support aop di that will be very cool 。 we need a framework to easy our life :D ; for some php developer they even know little oop knowledge , too many new tech introduced we don’t know it’s good to us or not. to be frank aop is still hard to learn for us . there are too many new concepts to us. etc aspect, advice ,cross cutting ,joinpoint … even we learn these concepts ,how to realize it in php is still a problem , and the performance will be a problem too . there are some main ways to realize aop ; proxy , static weave, dynamic weave , if use the proxy we may need introduce the container to yii ,there is no dynamic proxy class in php which generate a proxy class in runtime . if the zend engine support the dynamic weaving it will be better . the static way will modify the php source code by weaving the aspect to class . not sure if there exists such tools.

any way there are some php frameworks support the aop like: Ding ,typo3, workingtitle …

some project you can find in google code :http://code.google.com/p/php-aop/people/detail?u=@WBRfQFJQAhRFWAN9

some article : http://www.slideshare.net/wcandillon/aspectoriented-programming-for-php

AOP is not really possible in PHP until it supports a real fcgi.

The features may look great in a theory, but you need to take into account that it needs a complex object structure residing in RAM, which requires an application server.

I’m happy to announce that AOP is available for PHP now!

There is a pure PHP library that you can use for AOP with Yii framework. It is available at github.com/lisachenko/go-aop-php.

You can also have a look at the demo for Yii application: github.com/lisachenko/yii-aspect (just clone it and run in the browser)

It’s very impressive and good to have as an extension or recipe but I don’t think it should be included into the core.

Agree with you that AOP shouldn’t be in the core. Yii is simple, fast and reliable framework, whereas AOP is a new technology for PHP and it’s quite difficult to understand how to use it properly. However, as an extension for common use cases in application (logging, caching, transaction management, etc)- why not?

yeah,now that AOP is available for php extension by fcrosfly in github:https://github.com/baixing/AOP

glad to see these :lol: