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

Relock patches.lock.json on package install or update #553

Closed
wants to merge 1 commit into from

Conversation

rajeshreeputra
Copy link

@rajeshreeputra rajeshreeputra commented Feb 21, 2024

Description

Relates to/closes #479.

Related tasks

  • Documentation has been updated if applicable
  • Tests have been added
  • Does not break backwards compatibility OR a BC break has been discussed in the related issue(s).

Other notes

Testing steps:

  1. Add patch in root composer.json for package "vendor/a" with version 1.0.0
  2. Require package using composer require vendor/a:~1.0.0
  3. Now lock the patches.lock.json file using composer prl
  4. Now apply patches using composer prp
  5. Verify patch is applied to package(vendor/a)
  6. Now remove patch from root composer.json for package "vendor/a"
  7. Now update package using composer update vendor/a:~1.1.0
  8. Verify that the patches.lock.json file is not updated
  9. Verify composer-patches plugin trying to apply the patch to vendor/a package version 1.1.0
  10. Now apply changes from PR to composer-patches plugin
  11. Now update package using composer update vendor/a:~1.2.0
  12. Verify that the patches.lock.json file is updated

@rajeshreeputra rajeshreeputra marked this pull request as ready for review February 21, 2024 09:55
@cweagans
Copy link
Owner

I don't think this is the right behavior. Updating an existing lock file should be an explicit action that somebody takes, not something that happens automatically.

@cweagans cweagans closed this Jun 24, 2024
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.

Warn the user when patches.lock is not up to date
2 participants