mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 14:46:19 +08:00 
			
		
		
		
	@ -5,23 +5,27 @@ This file contains the upgrade notes for Yii 2.0. These notes highlight changes
 | 
			
		||||
could break your application when you upgrade Yii from one version to another.
 | 
			
		||||
Even though we try to ensure backwards compabitilty (BC) as much as possible, sometimes
 | 
			
		||||
it is not possible or very complicated to avoid it and still create a good solution to
 | 
			
		||||
a problem. You may also want to check out the [versioning policy](https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md) for further details.
 | 
			
		||||
a problem. You may also want to check out the [versioning policy](https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md)
 | 
			
		||||
for further details.
 | 
			
		||||
 | 
			
		||||
Upgrading in general is as simple as updating your dependency in your composer.json and
 | 
			
		||||
running `composer update`. In a big application however there may be more things to consider,
 | 
			
		||||
which are explained in the following.
 | 
			
		||||
 | 
			
		||||
> Note: This document assumes you have composer [installed globally](http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-composer) so that you can run the `composer` command. If you have a `composer.phar` file
 | 
			
		||||
inside of your project you need to replace `composer` with `php composer.phar` in the following.
 | 
			
		||||
> Note: This document assumes you have composer [installed globally](http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-composer)
 | 
			
		||||
so that you can run the `composer` command. If you have a `composer.phar` file inside of your project you need to
 | 
			
		||||
replace `composer` with `php composer.phar` in the following.
 | 
			
		||||
 | 
			
		||||
> Tip: Upgrading dependencies of a complex software project always comes at the risk of breaking something, so make sure
 | 
			
		||||
you have a backup (you should be doing this anyway ;) ).
 | 
			
		||||
 | 
			
		||||
Before upgrading, make sure you have a global installation of the latest version of the
 | 
			
		||||
[composer asset plugin](https://github.com/fxpio/composer-asset-plugin)
 | 
			
		||||
as well as a stable version of Composer:
 | 
			
		||||
Before upgrading, make sure you have the latest stable version of Composer:
 | 
			
		||||
 | 
			
		||||
    composer self-update
 | 
			
		||||
 | 
			
		||||
In case you use [composer asset plugin](https://github.com/fxpio/composer-asset-plugin) instead of currently recommended
 | 
			
		||||
[asset-packagist.org](https://asset-packagist.org) to install Bower and NPM assets, make sure it is upgraded to the latest version as well:
 | 
			
		||||
 | 
			
		||||
    composer global require "fxp/composer-asset-plugin:^1.4.1" --no-plugins
 | 
			
		||||
 | 
			
		||||
The simple way to upgrade Yii, for example to version 2.0.10 (replace this with the version you want) will be running `composer require`:
 | 
			
		||||
@ -50,6 +54,7 @@ if you want to upgrade from version A to version C and there is
 | 
			
		||||
version B between A and C, you need to follow the instructions
 | 
			
		||||
for both A and B.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Upgrade from Yii 2.0.13
 | 
			
		||||
-----------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user