Remove composer.lock and disable lock file generation#768
Merged
Conversation
This commit removes composer.lock from version control and configures Composer to not generate lock files. This is appropriate for WordPress plugins where dependencies should be resolved at install time to ensure compatibility with the environment. Changes: - Removed composer.lock from git repository - Added composer.lock to .gitignore - Set "lock": false in composer.json config to prevent lock file generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
composer.lockfrom version controlcomposer.lockto.gitignore"lock": falseincomposer.jsonconfig to prevent lock file generationThis resolves CI/CD failures caused by locked dependency versions that are incompatible with different PHP versions. For WordPress plugins, dependencies should be resolved at install time to ensure compatibility with the target environment.
Background
The previous PR (#767) was failing because
composer.lockcontained dependencies locked to PHP 8.1+ (doctrine/instantiator 2.0.0, exussum12/coverage-checker 1.1.1) while the CI was running PHP 8.0.30. By removing the lock file and configuring Composer to not generate one, dependencies will be resolved based on the constraints incomposer.jsonfor each environment.Test plan
composer installon PHP 8.0composer.lockis not generated after runningcomposer install🤖 Generated with Claude Code