Skip to content

Add COMPOSER_BIN environment variable for PHPUnit Bridge #35166

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

Closed
wants to merge 1 commit into from
Closed

Add COMPOSER_BIN environment variable for PHPUnit Bridge #35166

wants to merge 1 commit into from

Conversation

NoodlesNZ
Copy link

Q A
Branch? 4.4
Bug fix? yes
New feature? yes
Deprecations? no
Tickets Fix #34796
License MIT
Doc PR

I came across a weird edge case when PHPUnit Bridge tries to get the composer binary path inside Scrutinizer CI (see attached ticket). To work around this edge case I added an environment variable for the composer binary path.

@nicolas-grekas
Copy link
Member

I think there might be a better way, based on phpenv which composer.
We should add this command to the list of ways to autodiscover composer.
Could you give it a try?

@NoodlesNZ
Copy link
Author

I'm not sure it works. When I run that command on Scrutinizer I get:

scrutinizer@container-10:~$ phpenv which composer
rbenv: composer: command not found

But when I run which it gives me:

scrutinizer@container-10:~$ which composer
/usr/bin/composer

@nicolas-grekas
Copy link
Member

Replaced by #35219, which should solve the issue also. Thank you @NoodlesNZ!

@NoodlesNZ
Copy link
Author

Thanks @nicolas-grekas, a much more eloquent solution. I tested the patch on Scrutinizer and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants