Open spinzar opened 1 month ago
I've got similar problem when installing cpx locally.
Project has phpunit installed and contains tests
> composer require --dev cpx/cpx
> php vendor/bin/cpx test
'vendor' is not recognized as an internal or external command,
operable program or batch file.
It's because windows ignores Shebangs (doesn't run vendor/bin commands with php interpreter) and the proc_open command on windows should be either php vendor/bin/phpunit
or vendor/bin/phpunit.bat
.
Quick workaround is to modify Console::__toString
method:
- return trim("{$this->command} {$this->getCommandInput()}");
+ return trim("php {$this->command} {$this->getCommandInput()}");
But above is not enough for packages that are not installed:
> php vendor/bin/cpx friendsofphp/php-cs-fixer fix
'C:\Users\xxx/.cpx/friendsofphp/php-cs-fixer/latest/vendor/friendsofphp/php-cs-fixer/php-cs-fixer' is not recognized as an internal or external command,
operable program or batch file.
Environment:
Steps to Reproduce:
cpx
globally usingcomposer global require cpx/cpx
.cpx laravel new
in the terminal.