Skip to content
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

circular dependency issue after switching to composer v2 #7

Merged
merged 1 commit into from Jul 1, 2022

Conversation

partikus
Copy link

@partikus partikus commented Jun 29, 2022

when you run vendor/bin/phpunit with composer v2, then extra file (vendor/bin/phpunit) is being added to the autoloading list for tests with@runInSeparateProcess annotation.

This PR introduce a change removing **/bin/phpunit from the list.

from sebastianbergmann/phpunit#4846
Composer 2.2 introduces some additional indirection for binaries to allow everyone to use custom PHP versions e.g. php7.4 vendor/bin/phpunit and ensure that vendor/phpunit/phpunit/phpunit is executed with php7.4 always (this previously worked only in cases/platforms where symlinks were supported).

References
composer/composer#10387 (comment)
sebastianbergmann#4846

Workaround
There is a way to avoid this change. We have to call vendor/zf1s/phpunit/composer/bin/phpunit instead of vendor/bin/phpunit. I'm not sure if it's a good approach for switching to workaround. It might be confusing for others why there is a memory leak.

@partikus partikus self-assigned this Jun 29, 2022
@partikus
Copy link
Author

I would love to merge #8 before.

@falkenhawk
Copy link
Member

@partikus #8 has just been merged.

Copy link
Member

@falkenhawk falkenhawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for the investigation and the fix!

@falkenhawk falkenhawk merged commit f0e20f9 into master Jul 1, 2022
@falkenhawk falkenhawk deleted the composer2-compat branch July 13, 2022 09:44
falkenhawk added a commit that referenced this pull request Nov 27, 2022
followup to #7 - make the fix platform-agnostic (i.e. unstuck `@runInSeparateProcess` tests on windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants