Я создал проект с использованием 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"
Когда я пытался запустить «wp» в терминале vscode, он выдает следующую проблему.
c:\wamp64\www\wpcs>wp
'sh' is not recognized as an internal or external command,
operable program or batch file.