【推薦】先把 composer.lock
刪掉,再重新執(zhí)行 composer require robmorgan/phinx
rm composer.lock
composer require robmorgan/phinx
手動(dòng)降級(jí)包版本。由 3 降到 2 psr/log:^2
、psr/simple-cache:^2
命令:composer require psr/log:^2 psr/simple-cache:^2 robmorgan/phinx
這里是執(zhí)行日志
? root@hecs /www/wwwroot/webman git:(master) ? composer require robmorgan/phinx
Using version ^0.12.10 for robmorgan/phinx
./composer.json has been updated
Running composer update robmorgan/phinx
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/datasource[4.3.5, ..., 4.3.6] require psr/log ^1.0 || ^2.0 -> found psr/log[1.0.0, ..., 1.1.4, 2.0.0] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- cakephp/datasource[4.0.0, ..., 4.3.4] require psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- robmorgan/phinx 0.12.10 requires cakephp/database ^4.0 -> satisfiable by cakephp/database[4.0.0, ..., 4.3.6].
- cakephp/database[4.0.0, ..., 4.3.6] require cakephp/datasource ^4.0 -> satisfiable by cakephp/datasource[4.0.0, ..., 4.3.6].
- Root composer.json requires robmorgan/phinx ^0.12.10 -> satisfiable by robmorgan/phinx[0.12.10].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require robmorgan/phinx:*" to figure out if any version is installable, or "composer require robmorgan/phinx:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
? root@hecs /www/wwwroot/webman git:(master) ?