Skip to content

Commit

Permalink
Build/Test Tools: Prevent Composer lock file from being created.
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 WordPress where the `lock` file has no meaning.

It also makes life more straightforward 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.

Reference: [https://getcomposer.org/doc/06-config.md#lock Composer Documentation: Config: lock].
 
Follow-up to [51543].

Props jrf.
See #61530.

git-svn-id: https://develop.svn.wordpress.org/trunk@59082 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Sep 23, 2024
1 parent fd104ae commit a390799
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 @@ -25,7 +25,8 @@
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"lock": false
},
"scripts": {
"compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",
Expand Down

0 comments on commit a390799

Please sign in to comment.