Skip to content

Commit

Permalink
Composer: prevent a lock file from being created (#65359)
Browse files Browse the repository at this point in the history
Composer 1.10.0 introduced a `lock` config option, which, when set to `false` will prevent a `composer.lock` file from being created and will ignore it when one exists.

This is a useful option for packages like Gutenberg where the `lock` file has no meaning.

It also makes life more straight-forward for contributors as they don't have to remember that for this repo they should use `composer update` instead of `composer install`. Both will now work the same.

Refs:
https://getcomposer.org/doc/06-config.md#lock

Co-authored-by: jrfnl <jrf@git.wordpress.org>
Co-authored-by: desrosj <desrosj@git.wordpress.org>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent cb90a76 commit f9aa29a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true
}
},
"lock": false
},
"require-dev": {
"phpcompatibility/phpcompatibility-wp": "^2.1.3",
Expand Down

0 comments on commit f9aa29a

Please sign in to comment.