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

Add support for Promises being returned by uninstall in Composer 2.1 #364

Merged
merged 1 commit into from Jun 8, 2021

Conversation

Seldaek
Copy link
Contributor

@Seldaek Seldaek commented Jun 8, 2021

Fixes #363 I hope :)

See also #366 for a version of this PR targetting 1.x

@mstrelan
Copy link

mstrelan commented Jun 8, 2021

This appears to resolve the issue following the steps in #363 (comment), although I only applied the changes manually after running composer require cweagans/composer-patches. I have not tested this against older versions of Composer.

@Seldaek
Copy link
Contributor Author

Seldaek commented Jun 8, 2021

Thanks 👍🏻 Older versions return null instead of a promise, so array_filter should just return an empty array and the behavior will not be altered.

See https://github.com/composer/composer/blob/1.10/src/Composer/Installer/InstallationManager.php#L207-L212

@cweagans
Copy link
Owner

cweagans commented Jun 8, 2021

Thank you for this, @Seldaek! Really, really appreciate it!!

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.

Packages are getting deleted and not reinstalled since Composer 2.1.0
3 participants