安装数据库迁移的时候报错
composer require robmorgan/phinx
Your requirements could not be resolved to an installable set of packages.
Problem 1
- 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.
- cakephp/datasource[4.3.5, ..., 4.4.8] 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.
- robmorgan/phinx 0.13.3 requires cakephp/database ^4.0 -> satisfiable by cakephp/database[4.0.0, ..., 4.4.8].
- cakephp/database[4.0.0, ..., 4.4.8] require cakephp/datasource ^4.0 -> satisfiable by cakephp/datasource[4.0.0, ..., 4.4.8].
- Root composer.json requires robmorgan/phinx ^0.13.3 -> satisfiable by robmorgan/phinx[0.13.3].
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.
翻译过来
psr/log
被你composer.lock 锁定为3.0了,但是cakephp/datasource
需要1.x的psr/log
。按照提示命令里加一个
-W
自动升降级应该就好了。composer require -W robmorgan/phinx
牛B,学习了
我删除composer.lock安装就对了
牛,学习了