-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony\Component\Process expects an array not a string. #1081
Comments
Internal issue ID: BAP-21304 |
@Daimyo7 as a workaround you can use an older version of composer (anything prior to 2.3.0 should work). All composer versions are available for download here - https://getcomposer.org/download/ |
Ok I'll update the Dockerfile and set |
Ok setting the composer back to 2.2 was able to pass over the command array type error. Thanks for the response. I'll be sure to post a version of my Dockerfile later to a open project. |
Summary
[TypeError]
Symfony\Component\Process\Process::__construct(): Argument #1 ($command) must be of type array, string given, called in /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/Permission
sHandler.php on line 111
Steps to reproduce
composer run-script post-update-cmd
or composer run-script post-install-cmd
Actual Result
string(94) "ps aux|grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx'|grep -v root|head -1|cut -d' ' -f1"
going through line 110 return new Process($commandline);
Expected Result
string(94) "ps aux|grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx'|grep -v root|head -1|cut -d' ' -f1"
going through line 110 return new Process([$commandline]); // AS an ARRAY
Details about your environment
Custom Dockerfile
Additional information
https://github.com/symfony/process/blob/5.4/Process.php
In Process.php line 143:
[TypeError]
Symfony\Component\Process\Process::__construct(): Argument #1 ($command) must be of type array, string given, called in /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php on line 111
Exception trace:
at phar:///usr/local/bin/composer/vendor/symfony/process/Process.php:143
Symfony\Component\Process\Process->__construct() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php:111
Oro\Bundle\InstallerBundle\Composer\PermissionsHandler->getProcess() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php:95
Oro\Bundle\InstallerBundle\Composer\PermissionsHandler->runProcess() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php:81
Oro\Bundle\InstallerBundle\Composer\PermissionsHandler->getUsers() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php:49
Oro\Bundle\InstallerBundle\Composer\PermissionsHandler->setPermissionsSetfacl() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/PermissionsHandler.php:28
Oro\Bundle\InstallerBundle\Composer\PermissionsHandler->setPermissions() at /var/www/html/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Composer/ScriptHandler.php:196
Oro\Bundle\InstallerBundle\Composer\ScriptHandler::setPermissions() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:391
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:248
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:108
Composer\EventDispatcher\EventDispatcher->dispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:228
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:125
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Installer.php:372
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:241
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1015
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:334
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:130
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:83
require() at /usr/local/bin/composer:29
The text was updated successfully, but these errors were encountered: