Skip to content

[PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script #35219

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

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

oleg-andreyev
Copy link
Contributor

@oleg-andreyev oleg-andreyev commented Jan 5, 2020

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

Locally using phpenv together 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

@nicolas-grekas
Copy link
Member

What do you think of #35166 (comment)?

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Jan 5, 2020
@oleg-andreyev
Copy link
Contributor Author

@nicolas-grekas while phpenv which composer will work for detecting phpenv-composer proxy, it's still a bash script and I think that it's still possible that developers may wrap composer executable with custom wrapper.

About COMPOSER_BIN from #35166
IMO it's better to add detection instead of env. variable.

@nicolas-grekas nicolas-grekas changed the title When using phpenv + phpenv-composer plugin, composer executable is wr… When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script Jan 7, 2020
@nicolas-grekas nicolas-grekas changed the title When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script Jan 7, 2020
@nicolas-grekas nicolas-grekas force-pushed the detect-composer-wrapper branch from 6b2bf5c to 25c805e Compare January 7, 2020 19:24
@nicolas-grekas
Copy link
Member

Thank you @oleg-andreyev.

nicolas-grekas added a commit that referenced this pull request Jan 7, 2020
…, 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
@nicolas-grekas nicolas-grekas merged commit 25c805e into symfony:3.4 Jan 7, 2020
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