Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know which version of yii2 is being used and how to upgrade to the latest version of yii2?

Tags:

yii2

I am using a version of yii2 installed a few months back. Now I want it to be upgraded to the latest version.How can I know which version of Yii2 is being used and how to upgrade to the latest version of yii2?

like image 244
user7282 Avatar asked Mar 17 '15 19:03

user7282


People also ask

How do I know my Yii2 version?

If you want to know which version of Yii2 you are using run Yii::getVersion() .

What is the latest version of Yii?

The latest version 1.1. 23 was released in December 2020. In May 2011 the developers decided to use new PHP versions and fix architectural shortcomings, resulting in version 2.0. In May 2013 the Yii 2.0 code went public, followed by the first stable release in October 2014.

How do I know if Yii is installed?

In Linux, run ./yii in the base directory. In Windows, run yii. bat .

How do I upgrade Yii1 to Yii2?

As you know, there's no way to upgrade from Yii1 to Yii2 without re-writing code, since the Yii framework has been completely rewritten from the ground up for Yii 2.0. So you can't just upgrade your application directly on the new version.


2 Answers

Run ./yii command, you will get following output:

./yii

This is Yii version 2.0.8.

The following commands are available:

Source: https://stackoverflow.com/a/29271811/1897969

like image 61
mshakeel Avatar answered Oct 14 '22 15:10

mshakeel


In console in site folder run composer update. And composer will update you Yii2.

If you want to know which version of Yii2 you are using run Yii::getVersion().

like image 24
vitalik_74 Avatar answered Oct 14 '22 13:10

vitalik_74