In this post i will explain What to Expect from Yii 2.0. The latest version of Yii 2 is 2.0.0, released on October 12, 2014. It’s aimed to become a state-of-the-art of the new generation of PHP framework. Yii 2.0 is not compatible with 1.1. Yii 2.0.0 is a complete rewrite of its previous version Yii 1.1 which is one of the most popular PHP frameworks.
apps/ ready-to-use application templates
advanced/ a template suitable for building sophisticated Web applications
basic/ a template suitable for building simple Web applications
benchmark/ an application demonstrating the performance of Yii
build/ internally used build tools
framework/ core framework code
tests/ tests of the core framework code
The usage of namespaces and traits upped the requirements to PHP 5.4. Additionally, you’ll need the mb_string, PDO and intl extensions when you start developing. This should not be a problem if you run your own server, but might be if you’re on a shared environment. Of course, in time, that issue will disappear.
This is the preferred way of installing Yii 2.0. If you do not have Composer yet, you may install it by following the instructions here
After installing Composer, run the following command to install the Composer Asset Plugin:
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta3"
To install the basic application template, run the command below:
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.0
To install the advanced application template, run the command below:
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0
Download one of the following archive files, and then extract it to a Web-accessible folder:
The documentation quality for Yii 2.0 improved from Yii 1.1. I had a hard time figuring stuff out when I started with Yii 1.1 a few years ago and I feel the documentation is more extensive than before.
Have you looked at Yii 2.0 already or perhaps even built something with it already? Please tell us what you came across. I would love to know your experiences!
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.