使用Composer安装wp-cli的安装问题

时间:2018-09-13 02:46:00

标签: wordpress composer-php wp-cli

我已经使用composer创建了一个项目,该项目已经安装了phpUnit,php_codesniffer(用于wordpress)和phpcompatibility。

当我尝试使用以下命令添加wp-cli软件包时:

composer require wp-cli/wp-cli --prefer-source

它给出以下输出。我在bin / wp.bat的命名冲突中遇到问题:

c:\wamp64\www\wpcs>composer require  wp-cli/wp-cli --prefer-source
Using version ^2.0 for wp-cli/wp-cli
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
  - Installing wp-cli/php-cli-tools (v0.11.10): Cloning f99308f924 from cache
  - Installing wp-cli/mustangostang-spyc (0.6.3): Cloning 6aa0b4da69 from cache
  - Installing symfony/finder (v3.4.15): Cloning 8a84fcb207 from cache
  - Installing rmccue/requests (v1.7.0): Cloning 87932f52ff from cache
  - Installing ramsey/array_column (1.1.3): Cloning f8e52eb28e from cache
  - Installing mustache/mustache (v2.12.0): Cloning fe8fe72e9d from cache
  - Installing wp-cli/wp-cli (v2.0.1): Cloning 8b47483c73 from cache
   Skipped installation of bin bin/wp.bat for package wp-cli/wp-cli: name conflicts with an existing file
Writing lock file
Generating autoload files
> "vendor/bin/phpcs" --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility
Using config file: C:\wamp64\www\wpcs\vendor\squizlabs\php_codesniffer\CodeSniffer.conf

Config value "installed_paths" updated successfully; old value was "../../..,../../phpcompatibility/php-compatibility"

当我尝试在vscode终端中运行“ wp”时,它会引发以下问题。

c:\wamp64\www\wpcs>wp
'sh' is not recognized as an internal or external command,
operable program or batch file.

0 个答案:

没有答案