Upgradation of Yii1.1 to Yii2
There are many differences between 1.1 and 2.0 version of Yii. It was completely rewritten for version 2.0. There are some major differences between both the versions. Yii2 has introduced some more new features.
Changes regarding PHP
There are many differences in the PHP language used for Yii1.1 and Yii2. Some major changes are listed below.
The most important change in Yii2 is the use of namespace. Every class name is namespaced. This naming scheme follows the directory structure means it indicates the location of the corresponding file.
In Yii1, events were defined by an on- method. In Yii2, you can just call trigger() function to use any event name.
The most important change in views is that $this now no longer refers to current controller. Instead, it refers to a view object. To access a controller in the view part use $this->context.
Yii2 introduces a new concept called asset bundle. An asset bundle is a collection of asset files within a directory. Assets in the bundle are made accessible via Web.