Repository navigation
test: commit the composer.lock files of the PHP test dependencies - #4198
Merged
Merged
Conversation
The PHP dependencies of the acceptance tests were installed without lock files: .gitignore excluded them, and the Makefile deleted a lock file whenever its composer.json changed. So every run resolved the newest versions allowed by the composer.json files, and the tests depended on whatever was released upstream that day. Commit the lock files of the root, vendor-bin/behat and vendor-bin/opencloud-codestyle, and install exactly what they pin. Before installing, `composer validate` fails if a composer.json was changed without updating its lock file. The vendor-bin namespaces don't inherit config.platform of the root composer.json, so they now set it themselves, to PHP 8.4.1 like the CI images (PHPUnit 13.3 needs at least 8.4.1). The lock files no longer depend on the PHP version of whoever updates them. Dependabot now updates the lock files weekly. Fixes #4190 Assisted-by: Claude Code:claude-opus-5-5
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (3f1d8b0) 98948 32490 32.84% Head commit (2fdbb7c) 98948 (+0) 32490 (+0) 32.84% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#4198) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
The lock files are committed now and the container no longer creates them, so there is no need to make them writable for everyone. The chmod 777 set their executable bit, which git reports as a mode change of the committed files. Assisted-by: Claude Code:claude-opus-5-5
saw-jan
approved these changes
Dec 4, 2026
openclouders
pushed a commit
that referenced
this pull request
Dec 4, 2026
) * test: commit the composer.lock files of the PHP test dependencies The PHP dependencies of the acceptance tests were installed without lock files: .gitignore excluded them, and the Makefile deleted a lock file whenever its composer.json changed. So every run resolved the newest versions allowed by the composer.json files, and the tests depended on whatever was released upstream that day. Commit the lock files of the root, vendor-bin/behat and vendor-bin/opencloud-codestyle, and install exactly what they pin. Before installing, `composer validate` fails if a composer.json was changed without updating its lock file. The vendor-bin namespaces don't inherit config.platform of the root composer.json, so they now set it themselves, to PHP 8.4.1 like the CI images (PHPUnit 13.3 needs at least 8.4.1). The lock files no longer depend on the PHP version of whoever updates them. Dependabot now updates the lock files weekly. Fixes #4190 Assisted-by: Claude Code:claude-opus-5-5 * test: don't chmod the composer.lock files after the docker test run The lock files are committed now and the container no longer creates them, so there is no need to make them writable for everyone. The chmod 777 set their executable bit, which git reports as a mode change of the committed files. Assisted-by: Claude Code:claude-opus-5-5
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.
Fixes #4190
The PHP dependencies of the acceptance tests now come from committed lock files instead of being resolved anew on every run.
composer.lock,vendor-bin/behat/composer.lockandvendor-bin/opencloud-codestyle/composer.lock, and drop them from.gitignore.composer validatebefore installing, so that acomposer.jsonchanged without updating its lock file fails instead of installing outdated dependencies.config.platform.phpto 8.4.1 in bothvendor-binnamespaces: they don't inherit it from the rootcomposer.json(contrary to what the issue assumed), so the lock files depended on the local PHP of whoever updated them. 8.4.1 because PHPUnit 13.3 needs it.tests/README.md: running the tests locally needs PHP 8.4.1 or newer with theldapextension. The docker setup and the CI already use the PHP 8.4 image.Tested locally: clean install with
make vendor-bin/behat/vendor vendor-bin/opencloud-codestyle/vendorinstalls from the lock files and leaves them unchanged,make test-php-stylepasses, and a stale lock file makescomposer validatefail.AI assistance: Claude Code (claude-opus-5-5) generated the lock files, made the changes and wrote this description; I reviewed them.