Home >PHP Framework >YII >How to check the version of yii

How to check the version of yii

(*-*)浩
(*-*)浩Original
2019-11-06 09:47:347220browse

Framework upgrade is not necessary, but it can avoid unknown bugs and the use of new features

How to check the version of yii

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"

How to check the version of yii

Then upgrade Yii by running:

php composer.phar update yiisoft/yii2 yiisoft/yii2-composer bower-asset/jquery.inputmask

How to check the version of yii2). 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to bind events in yiiNext article:How to bind events in yii