-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Version information not yet available in scripts for post-update-cmd and post-install-cmd #9457
Comments
I've done a little debugging as I'm also affected by this bug. I don't really know the mechanism of this package, but while this https://github.com/composer/package-versions-deprecated/blob/c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855/src/PackageVersions/Installer.php#L103 evaluates to It's just my 2 cents, I thought this disparity might be a lead to investigate. |
Further investigations revealed that due to composer 2.0 implementing the InstalledVersion class itself the InstalledVersion class it uses at runtime is not the same that is generated after install by this package, but the one which is in the composer phar. |
Indeed @adamturcsan the data was not available at runtime, which was an oversight. It was thought of to be used by the project and not by plugins, but plugins are also a valid use case for sure. Please confirm it works with |
@Seldaek and @adamturcsan Thank you both for your time and effort. I can confirm the correct installed versions are now used. |
@Seldaek Thanks for the rapid action! It works for me too :) |
thank you @Seldaek $:tumbler_glass:++ |
Hi there,
After discussing the issue Roave/you-are-using-it-wrong#95 it seems that the package version is not yet available when running scripts for post-update-cmd and post-install-cmd.
I'm using composer v2.0.6.
I don't know if this is the correct repo for this issue. It was suggested in the original issue mentioned before.
Thank you in advance and it you need more information, let me know.
Cheers, Frank
The text was updated successfully, but these errors were encountered: