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

Composer validate task not running when composer.lock changes #1141

Closed
vever001 opened this issue Jun 12, 2024 · 0 comments
Closed

Composer validate task not running when composer.lock changes #1141

vever001 opened this issue Jun 12, 2024 · 0 comments

Comments

@vever001
Copy link
Contributor

vever001 commented Jun 12, 2024

Q A
Version 2.5.0 and 2.x
Bug? (arguably) yes
New feature? no
Question? no
Documentation? no
Related tickets -

Currently the composer task gets triggered/run only when composer.json changes.
In many cases, only the composer.lock gets changed (of course, if it is committed/versioned in the project) and the composer task should run, otherwise we can end up with an invalid composer.lock hash (for example).

For example: if we merge/rebase a branch and have composer.lock conflicts, and the rebase doesn't contain any change to composer.json, and forget to run composer update --lock to refresh the hash after fixing conflicts, then we end up with an invalid lock hash.

Steps to reproduce:
On a project with the composer.lock committed/versioned, and the composer task enabled.

  1. Hack (change manually) the composer.lock hash.
  2. Commit, and notice that the grumphp composer task doesn't run.

The composer lock is now invalid, grumphp could prevent that.

Proposed resolution:
Add the composer.lock to the detection.

Possibly add a setting to enable/disable this, in order to keep the current behavior?
But would that have any applications/added value?

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

No branches or pull requests

2 participants