Closed
Description
Symfony version(s) affected: 4.4.1
Description
When trying to install phpunit bridge in Scrutinizer CI it tries to guess the path for composer. For some strange reason $COMPOSER
gets evaluated to:
'/home/scrutinizer/.phpenv/versions/7.3.0/bin/php' '/usr/bin/composer'
When you run this via the command line or via the simple-phpunit.php script it displays:
php /usr/bin/composer.phar $@
It then fails to create the $PHPUNIT_VERSION_DIR
directory and thus everything else fails.
How to reproduce
Run ./bin/phpunit install
inside Scrutinizer CI
Possible Solution
Check for COMPOSER_BIN
environment variable and use that ahead of trying to work out the path.
Additional context
php /usr/bin/composer.phar $@
PHP Warning: chdir(): No such file or directory (errno 2) in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 127
Warning: chdir(): No such file or directory (errno 2) in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 127
php /usr/bin/composer.phar $@
php /usr/bin/composer.phar $@
php /usr/bin/composer.phar $@
php /usr/bin/composer.phar $@
PHP Warning: file_get_contents(./src/Framework/TestCase.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 156
Warning: file_get_contents(./src/Framework/TestCase.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 156
PHP Warning: file_put_contents(./src/Framework/TestCase.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 161
Warning: file_put_contents(./src/Framework/TestCase.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 161
PHP Warning: file_get_contents(./src/Framework/Assert.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 164
Warning: file_get_contents(./src/Framework/Assert.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 164
PHP Warning: file_put_contents(./src/Framework/Assert.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 166
Warning: file_put_contents(./src/Framework/Assert.php): failed to open stream: No such file or directory in /home/scrutinizer/build/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 166