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

Changes are rolled-back by additional calls to composer install #25

Closed
lkmorlan opened this issue Mar 17, 2020 · 3 comments · Fixed by #26
Closed

Changes are rolled-back by additional calls to composer install #25

lkmorlan opened this issue Mar 17, 2020 · 3 comments · Fixed by #26

Comments

@lkmorlan
Copy link
Contributor

If I run composer install version numbers are added. If I run it again, rollbackRewrite() removes the version numbers but they do not get added back again. I think this is because neither POST_PACKAGE_INSTALL nor POST_PACKAGE_UPDATE get run for packages that do not need to be changed on the subsequent run of composer install.

@lkmorlan
Copy link
Contributor Author

This can be solved by having a method which runs on POST_INSTALL_CMD and POST_UPDATE_CMD which rollbackRewrite() but calls doWriteInfoFiles() instead of doRollback(). I've tested this and it works. Would you like me to write up a pull request with this?

@jhedstrom
Copy link
Collaborator

Yeah, that would be awesome! Thanks for digging into this.

@lkmorlan
Copy link
Contributor Author

My solution is in #26.

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 a pull request may close this issue.

2 participants