问题
I did my project in cakePHP 3.0. By updating the composer my project converted into cakePHP 3.2. I want to rollback from 3.2 to 3.0. I tried rollback options too,that is also not working. How to rollback 3.2 to 3.0 ?
回答1:
The rollback
command supporty by composer is for the composer itself, ie it rolls back your composer installation to an earlier version, not anything that might have been installed via composer.
To change the version of the cakephp/cakephp
dependency, simply require the new version with a version constraint that doesn't match 3.1
and above, so in your case, if you want to switch back to the 3.0.x
branch, you could just run
$ composer require cakephp/cakephp:"~3.0.0"
The ~3.0.0
constraint will match >= 3.0.0 && < 3.1.0
. See Composer Docs > Versions for more information on version constraints supported by composer.
However, You may encounter conflicts with other dependencies like cakephp/debug_kit
or cakephp/bake
, which need to be solved manually, for example by downgrading or even temporarily removing them, as they may have been upgraded too and require a newer cakephp/cakephp
version themselves!
来源:https://stackoverflow.com/questions/37275141/how-to-rollback-cakephp-3-2-to-3-0