Skip to content

Composer: prevent a lock file from being created#390

Merged
jrfnl merged 1 commit intotrunkfrom
JRF/composer-no-lock
Mar 19, 2025
Merged

Composer: prevent a lock file from being created#390
jrfnl merged 1 commit intotrunkfrom
JRF/composer-no-lock

Conversation

@jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Dec 13, 2024

Context

  • Improve dev experience

Summary

This PR can be summarized in the following changelog entry:

  • Improve dev experience

Relevant technical choices:

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.

As for this package, none of the dependencies need to be locked, we can use this option.

It also makes life easier 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

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Delete a potentially existing composer.lock from your local clone
  • Run composer install
  • Verify that the composer.lock file was not re-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.

As for this package, none of the dependencies need to be locked, we can use this option.

It also makes life easier 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
@jrfnl jrfnl added this to the 4.6 milestone Dec 13, 2024
@jrfnl jrfnl merged commit 1d22aa6 into trunk Mar 19, 2025
22 checks passed
@jrfnl jrfnl deleted the JRF/composer-no-lock branch March 19, 2025 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant