Closed jamesdevine closed 4 years ago
@richardhj encountered the same problem.
$cmd
is an array and not a string:
Technically it shouldn't be, because within composer
a much older version of symfony/process
is in use. See https://github.com/contao/contao/issues/1956
Could anyone of you run the following? You need to set a breakpoint in the constructor of Process
inside the composer.phar
+ have xdebug
enabled on the CLI.
COMPOSER_ALLOW_XDEBUG=1 php -dxdebug.remote_enable=1 -dxdebug.remote_autostart=1 composer.phar run post-update-cmd
I'm curious about the used process version and the callstack. All process versions up to symfony/process
v5.0 allow passing a string and contain the method setCommandline()
. We use this to identify if we need to implode the string but it seems there is something going wrong.
The following code in src/Composer/ScriptHandler.php causes an "Array to string conversion" error if a command doesn't successfully run.
Line 94:
$cmd
is an array and not a string:Line 60:
private static function executeCommand(array $cmd, Event $event, string $env = 'prod'): void