Build/Test Tools: Prevent Composer lock file from being created.

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
This commit is contained in:
Sergey Biryukov 2024-09-23 22:15:11 +00:00
parent fd104aed14
commit a39079946a

View File

@ -25,7 +25,8 @@
"config": { "config": {
"allow-plugins": { "allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true "dealerdirect/phpcodesniffer-composer-installer": true
} },
"lock": false
}, },
"scripts": { "scripts": {
"compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",