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
While testing another issue locally, I encountered an issue which happens when you clear the composer cache before running on of the patch commands (e.g. patch:redo). The processReinstallOperation, and more specifically the download part, seems to resolve the promise too early without waiting for download completion, resulting in an empty package directory while patching.
The issue is clearly reproducible by adding some debug information to the promise chain in processReinstallOperation, which shows that the patch operation happens before the installation of the package.
I managed to resolve the issue by using the Composer\Utils\SyncHelper::downloadAndInstallPackageSync but this incurs passing the Composer object around. I'm not well versed in composer plugins but will make a PR regardless.
To Reproduce
Steps to reproduce the behavior:
Run composer clear-cache
Run composer patch:redo --vvv
Optionally change the processReinstallOperation to add debug information
While testing another issue locally, I encountered an issue which happens when you clear the composer cache before running on of the patch commands (e.g. patch:redo). The
processReinstallOperation
, and more specifically thedownload
part, seems to resolve the promise too early without waiting for download completion, resulting in an empty package directory while patching.The issue is clearly reproducible by adding some debug information to the promise chain in
processReinstallOperation
, which shows that the patch operation happens before the installation of the package.I managed to resolve the issue by using the
Composer\Utils\SyncHelper::downloadAndInstallPackageSync
but this incurs passing theComposer
object around. I'm not well versed in composer plugins but will make a PR regardless.To Reproduce
Steps to reproduce the behavior:
composer clear-cache
composer patch:redo --vvv
Optionally change the
processReinstallOperation
to add debug informationExpected
Packages are downloaded and installed before attempting to patch.
Actual
Packages are downloaded but patching begins before the installation process completed.
The text was updated successfully, but these errors were encountered: