Skip to content

PHPUnit Bridge fails in CI environment #34796

@NoodlesNZ

Description

@NoodlesNZ

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy