phpro / grumphp

A PHP code-quality tool
MIT License
4.12k stars 430 forks source link

Add --no-check-lock option support #947

Closed RoSk0 closed 2 years ago

RoSk0 commented 2 years ago
Q A
Version GrumPHP 1.5.0
Bug? no
New feature? yes
Question? no
Documentation? no
Related tickets #595 , #596 , #645 , #944, #945

composer-normalize introduced --no-check-lock option in 2.7.0 release back in August 2020.

This option is very useful when you work on a library project and you only concerned about the composer.json file but not that much about the lock file that only exists in the development environment for the library itself.

It would be awesome to see it available via configuration for the composer_normalize task.

RoSk0 commented 2 years ago

The only thing that is missing is tests - unfortunately I haven't figured out this part. ComposerNormalizeSpec added with this task originally gone form the code base...

veewee commented 2 years ago

Looks nice! Thanks for the addition.

Just to answer your question : we transitioned the task system at some point in time. The spec tests for the tasks weren't really helpful. That is why we added a new way of testing tasks through phpunit.

Looks like you found that during your PR, so that's nice! :)