Home >PHP Framework >YII >How to check the version of yii
Framework upgrade is not necessary, but it can avoid unknown bugs and the use of new features
1. Check the current version of Yii2.0 What is the method
The first one: echo \Yii::getVersion() directly on the page; (recommended learning: yii tutorial)
The second one Type: Use the command window: There is a yii file in the project directory, execute this file directly: ./yii
2. Before installation, be sure to check the upgrade log and instructions
http://www.yiichina.com/download
On the download page of the official website, you can find logs and instructions
Log: You can see that this version upgrade has solved bugs and the like
Instructions: Maybe What new methods have been added, and what are the precautions for upgrading this version?
3. Upgrade methods
There are two methods:
1) .If you are upgrading from Yii 2.0.0 through composer, just run the following command in your project root directory:
First, make sure you have the latest version of the Composer resource plug-in installed:
php composer.phar global require "fxp/composer-asset-plugin:~1.2.0"
Then upgrade Yii by running:
php composer.phar update yiisoft/yii2 yiisoft/yii2-composer bower-asset/jquery.inputmask
2). If you installed Yii using an archive file, you should download the latest version of the file, unzip it and replace the old version .
The above is the detailed content of How to check the version of yii. For more information, please follow other related articles on the PHP Chinese website!