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?
If you want to know which version of Yii2 you are using run Yii::getVersion() .
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.
In Linux, run ./yii in the base directory. In Windows, run yii. bat .
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.
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
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()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With