来解决问题
尝试在全球安装WP -CLI - 但它不起作用:
$ composer global require wp-cli/wp-cli
Changed current directory to /home/self/.composer
Using version ^1.0 for wp-cli/wp-cli
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for wp-cli/wp-cli ^1.0 -> satisfiable by wp-cli/wp-cli[v1.0.0].
- Conclusion: remove symfony/console v3.0.2
- Conclusion: don't install symfony/console v3.0.2
- wp-cli/wp-cli v1.0.0 requires symfony/console ~2.7 -> satisfiable by symfony/console[v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9].
- Can only install one of: symfony/console[v2.7.0, v3.0.2].
...
- Can only install one of: symfony/console[v2.8.9, v3.0.2].
- Installation request for symfony/console (locked at v3.0.2) -> satisfiable by symfony/console[v3.0.2].
Installation failed, deleting ./composer.json.
编辑
作曲家全球为什么Symfony/Console
Changed current directory to /home/self/.composer
consolidation/annotated-command 2.2.2 requires symfony/console (^2.8|~3)
consolidation/log 1.0.3 requires symfony/console (~2.5|~3.0)
consolidation/output-formatters 3.1.5 requires symfony/console (~2.5|~3.0)
consolidation/robo 1.0.5 requires symfony/console (~2.8|~3.0)
laravel/installer v1.3.1 requires symfony/console (~2.3|~3.0)
victorjonsson/markdowndocs 1.3.7 requires symfony/console (>=2.6)
作曲家中有一个非常酷的命令: composer why
我邀请您提供composer why symfony/console
的结果。某种方法将其锁定在特定版本(3.0.2)上,但是WP针对较旧的版本...
如果您的工具发生冲突,则需要查看将WP-CLI更改为Symfony/Console 3时会发生什么,然后在WP-CLI上创建PR。如果需要,我可以指导您完成此过程。
我能够通过删除全局composer.lock
并运行composer global install