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
CI CD pipeline error rtrim expects parameter 1 to be string, bool given #10670
Comments
What Composer version are you running? I can't make sense of why this would fail with latest code.. but yet it seems to fail. If you can also make sure you run it with |
Same issue here, running from Ansible I get the above error. Running locally works fine |
Hello @Seldaek My Composer version is: Composer 2.3.0 2022-03-30 11:15:36 |
Same here, deploying to AWS and version is 2.3.0. Forcing deploy to use version 2.2.9 works. |
OK I can repro, will hopefully get a fix out soon. |
Strangely the version pinning on install doesnt seem to work
|
Sorry just to make sure I can clean this up correctly, do all of you have the |
Yes |
I don't explicity set that env var (Can't see that mentioned in install docs?) - Presume the install script sets that?
Out install script hasn't changed recently though so presume something in the upgrade has stopped the install script setting that env var? |
https://github.com/composer/composer/releases/tag/2.3.1 is out now. Everyone please try release candidates next time :) If you update your scripts now you can change |
@Seldaek the --version doesn't seem to work but I'll open a new ticket. Thanks for fix |
That fixed it. Thanks for your reactivity @Seldaek! I didn't know about the |
Yes |
I have set up GitLab's CI CD pipeline in my project.
I am facing issues like the below error ("rtrim() expects parameter 1 to be string, bool given") when trying to run the composer install command from GitLab's ci cd pipeline job.
But when I run that command manually using ssh then works fine.
Please help me with this guys.
below is the error stash:
Fatal error: Uncaught TypeError: rtrim() expects parameter 1 to be string, bool given in phar:///usr/local/composer.phar/src/Composer/Config.php:377
Stack trace:
#0 phar:///usr/local/composer.phar/src/Composer/Config.php(377): rtrim(false, '/\')
#1 phar:///usr/local/composer.phar/src/Composer/Factory.php(180): Composer\Config->get('home')
#2 phar:///usr/local/composer.phar/src/Composer/Factory.php(324): Composer\Factory::createConfig(Object(Composer\IO\ConsoleIO), '/var/app/stagin...')
#3 phar:///usr/local/composer.phar/src/Composer/Factory.php(610): Composer\Factory->createComposer(Object(Composer\IO\ConsoleIO), Array, true, '/var/app/stagin...', true, false)
#4 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(469): Composer\Factory::create(Object(Composer\IO\ConsoleIO), NULL, true, false)
#5 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(411): Composer\Console\Application->getComposer(false, true)
#6 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(352): Com in phar:///usr/local/composer.phar/src/Composer/Config.php on line 377
2022/03/30 11:35:14.949767 [ERROR] An error occurred during execution of command [app-deploy] - [Install composer dependencies]. Stop running the command. Error: installing composer dependencies failed with error: Command /bin/sh -c composer.phar install --no-ansi --no-interaction failed with error exit status 255. Stderr:Do not run Composer as root/super user! See https://getcomposer.org/root for details
PHP Fatal error: Uncaught TypeError: rtrim() expects parameter 1 to be string, bool given in phar:///usr/local/composer.phar/src/Composer/Config.php:377
Stack trace:
#0 phar:///usr/local/composer.phar/src/Composer/Config.php(377): rtrim(false, '/\')
#1 phar:///usr/local/composer.phar/src/Composer/Factory.php(180): Composer\Config->get('home')
#2 phar:///usr/local/composer.phar/src/Composer/Factory.php(324): Composer\Factory::createConfig(Object(Composer\IO\ConsoleIO), '/var/app/stagin...')
#3 phar:///usr/local/composer.phar/src/Composer/Factory.php(610): Composer\Factory->createComposer(Object(Composer\IO\ConsoleIO), Array, true, '/var/app/stagin...', true, false)
#4 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(469): Composer\Factory::create(Object(Composer\IO\ConsoleIO), NULL, true, false)
#5 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(411): Composer\Console\Application->getComposer(false, true)
#6 phar:///usr/local/composer.phar/src/Composer/Console/Application.php(352): Com in phar:///usr/local/composer.phar/src/Composer/Config.php on line 377
The text was updated successfully, but these errors were encountered: