You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
The text was updated successfully, but these errors were encountered:
…, composer executable is wrapped into a bash script (oleg-andreyev)
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #34796
| License | MIT
| Doc PR | -
Locally using [phpenv](https://github.com/phpenv/phpenv) together [phpenv-composer](https://github.com/ngyuki/phpenv-composer) with for managing php versions and composer installations.
`which composer` is detecting wrapper instead of binary.
Before appending PHP executable to composer path need to validate that detected composer is not a wrapper otherwise PHP will simply return the content of a wrapper
Commits
-------
25c805e [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
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:When you run this via the command line or via the simple-phpunit.php script it displays:
It then fails to create the
$PHPUNIT_VERSION_DIR
directory and thus everything else fails.How to reproduce
Run
./bin/phpunit install
inside Scrutinizer CIPossible Solution
Check for
COMPOSER_BIN
environment variable and use that ahead of trying to work out the path.Additional context
The text was updated successfully, but these errors were encountered: