test: commit the composer.lock files of the PHP test dependencies (#4198)

* 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 commit is contained in:
Viktor Scharf authored and GitHub committed 2026-12-04 08:32:24 +01:00
1 parent 208b772beb
commit c77ba9ce0f
10 files changed
+5652 -15

No files matched your search

+11
View File
@@ -13,3 +13,14 @@ updates:
open-pull-requests-limit: 4
cooldown:
default-days: 1
- package-ecosystem: "composer"
directories:
- "/"
- "/vendor-bin/behat"
- "/vendor-bin/opencloud-codestyle"
schedule:
interval: "weekly"
open-pull-requests-limit: 4
cooldown:
default-days: 7
-2
View File
@@ -30,9 +30,7 @@ opencloud/cmd/opencloud/config/
.idea
# Composer - used for API acceptance tests
composer.lock
vendor-bin/**/vendor
vendor-bin/**/composer.lock
vendor-php
# API acceptance tests - auto-generated files
+6 -12
View File
@@ -110,7 +110,7 @@ help:
.PHONY: clean-tests
clean-tests:
@rm -Rf vendor-bin/**/vendor vendor-bin/**/composer.lock tests/acceptance/output
@rm -Rf vendor-bin/**/vendor tests/acceptance/output
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
@@ -118,20 +118,16 @@ BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
test-acceptance-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) tests/acceptance/scripts/run.sh
# The composer.lock files are committed: install exactly what they pin, and
# fail if a composer.json was changed without updating its lock file.
vendor/bamarni/composer-bin-plugin: composer.lock
composer validate --no-check-publish --no-check-all
composer install
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
composer bin behat validate --no-check-publish --no-check-all
composer bin behat install --no-progress
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
@echo behat composer.lock is not up to date.
@rm vendor-bin/behat/composer.lock || true
composer.lock: composer.json
@echo composer.lock is not up to date.
@rm composer.lock || true
.PHONY: generate
generate: generate-prod # production is always the default
@@ -310,7 +306,5 @@ test-php-style-fix: vendor-bin/opencloud-codestyle/vendor
$(PHP_CODEBEAUTIFIER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance
vendor-bin/opencloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/opencloud-codestyle/composer.lock
composer bin opencloud-codestyle validate --no-check-publish --no-check-all
composer bin opencloud-codestyle install --no-progress
vendor-bin/opencloud-codestyle/composer.lock: vendor-bin/opencloud-codestyle/composer.json
@echo opencloud-codestyle composer.lock is not up to date.
Generated
+81
View File
@@ -0,0 +1,81 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "24c56bdb92550e9d3464e52839be7085",
"packages": [],
"packages-dev": [
{
"name": "bamarni/composer-bin-plugin",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "641d0663f5ac270b1aeec4337b7856f76204df47"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/641d0663f5ac270b1aeec4337b7856f76204df47",
"reference": "641d0663f5ac270b1aeec4337b7856f76204df47",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
"composer/composer": "^2.2.26",
"ext-json": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8 || ^2.0",
"phpstan/phpstan-phpunit": "^1.1 || ^2.0",
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.0",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
},
"autoload": {
"psr-4": {
"Bamarni\\Composer\\Bin\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"keywords": [
"composer",
"conflict",
"dependency",
"executable",
"isolation",
"tool"
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.9.1"
},
"time": "2026-02-04T10:18:12+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {},
"platform-dev": {
"ext-simplexml": "*"
},
"platform-overrides": {
"php": "8.4"
},
"plugin-api-version": "2.6.0"
}
+2
View File
@@ -181,6 +181,8 @@ docker compose -f tests/acceptance/docker/src/wopi-validator-test.yml up -d
## Running Test Suite in Local Environment
Running the tests locally needs PHP 8.4.1 or newer with the `ldap` extension, and Composer 2.
### Run OpenCloud
Create an up-to-date OpenCloud binary by [building OpenCloud]({{< ref "build" >}})
+1 -1
View File
@@ -39,4 +39,4 @@ fi
sleep 10
make -C "$OC_ROOT" test-acceptance-api
chmod -R 777 "${OC_ROOT}/vendor-bin/"*"/vendor" "${OC_ROOT}/vendor-bin/"*"/composer.lock" "${OC_ROOT}/tests/acceptance/output" 2>/dev/null || true
chmod -R 777 "${OC_ROOT}/vendor-bin/"*"/vendor" "${OC_ROOT}/tests/acceptance/output" 2>/dev/null || true
+5
View File
@@ -11,5 +11,10 @@
"swaggest/json-schema": "^0.12",
"splitbrain/php-archive": "^1.5",
"symfony/http-foundation": "^8.1"
},
"config": {
"platform": {
"php": "8.4.1"
}
}
}
+5173
View File
File diff suppressed because it is too large. Load diff
@@ -3,6 +3,9 @@
"doctrine/coding-standard": "^14.0"
},
"config": {
"platform": {
"php": "8.4.1"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
+370
View File
@@ -0,0 +1,370 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a47d5e98b9ef9f85de77292631d083db",
"packages": [],
"packages-dev": [
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/composer-installer.git",
"reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/963f0c67bffde0eac41b56be71ac0e8ba132f0bd",
"reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.2",
"php": ">=5.4",
"squizlabs/php_codesniffer": "^3.1.0 || ^4.0"
},
"require-dev": {
"composer/composer": "^2.2",
"ext-json": "*",
"ext-zip": "*",
"php-parallel-lint/php-parallel-lint": "^1.4.0",
"phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev",
"yoast/phpunit-polyfills": "^1.0"
},
"type": "composer-plugin",
"extra": {
"class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"autoload": {
"psr-4": {
"PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Franck Nijhof",
"email": "opensource@frenck.dev",
"homepage": "https://frenck.dev",
"role": "Open source developer"
},
{
"name": "Contributors",
"homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
"keywords": [
"PHPCodeSniffer",
"PHP_CodeSniffer",
"code quality",
"codesniffer",
"composer",
"installer",
"phpcbf",
"phpcs",
"plugin",
"qa",
"quality",
"standard",
"standards",
"style guide",
"stylecheck",
"tests"
],
"support": {
"issues": "https://github.com/PHPCSStandards/composer-installer/issues",
"security": "https://github.com/PHPCSStandards/composer-installer/security/policy",
"source": "https://github.com/PHPCSStandards/composer-installer"
},
"funding": [
{
"url": "https://github.com/PHPCSStandards",
"type": "github"
},
{
"url": "https://github.com/jrfnl",
"type": "github"
},
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
},
{
"url": "https://thanks.dev/u/gh/phpcsstandards",
"type": "thanks_dev"
}
],
"time": "2026-05-06T08:26:05+00:00"
},
{
"name": "doctrine/coding-standard",
"version": "14.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/coding-standard.git",
"reference": "897a7dc209e49ee6cf04e689c41112df17967130"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/coding-standard/zipball/897a7dc209e49ee6cf04e689c41112df17967130",
"reference": "897a7dc209e49ee6cf04e689c41112df17967130",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0.0",
"php": "^7.4 || ^8.0",
"slevomat/coding-standard": "^8.23",
"squizlabs/php_codesniffer": "^4"
},
"type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Steve Müller",
"email": "st.mueller@dzh-online.de"
}
],
"description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.",
"homepage": "https://www.doctrine-project.org/projects/coding-standard.html",
"keywords": [
"checks",
"code",
"coding",
"cs",
"dev",
"doctrine",
"rules",
"sniffer",
"sniffs",
"standard",
"style"
],
"support": {
"issues": "https://github.com/doctrine/coding-standard/issues",
"source": "https://github.com/doctrine/coding-standard/tree/14.0.0"
},
"time": "2025-09-21T18:21:47+00:00"
},
{
"name": "phpstan/phpdoc-parser",
"version": "2.6.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "516c0ce982f41343e4bb18dd6aa503a2d1fa72d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/516c0ce982f41343e4bb18dd6aa503a2d1fa72d0",
"reference": "516c0ce982f41343e4bb18dd6aa503a2d1fa72d0",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"require-dev": {
"doctrine/annotations": "^2.0",
"nikic/php-parser": "^5.3.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.6",
"symfony/process": "^5.2"
},
"type": "library",
"autoload": {
"psr-4": {
"PHPStan\\PhpDocParser\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.6.0"
},
"time": "2026-12-01T16:31:50+00:00"
},
{
"name": "slevomat/coding-standard",
"version": "8.32.0",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
"reference": "a3626af1ca230c42b8e0486c1448c19a8fb9d09f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/a3626af1ca230c42b8e0486c1448c19a8fb9d09f",
"reference": "a3626af1ca230c42b8e0486c1448c19a8fb9d09f",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.2.1",
"php": "^7.4 || ^8.0",
"phpstan/phpdoc-parser": "^2.4.1",
"squizlabs/php_codesniffer": "^4.0.4"
},
"require-dev": {
"phing/phing": "3.0.1|3.1.2",
"php-parallel-lint/php-parallel-lint": "1.4.0",
"phpstan/phpstan": "2.3.7",
"phpstan/phpstan-deprecation-rules": "2.0.6",
"phpstan/phpstan-phpunit": "2.1.3",
"phpstan/phpstan-strict-rules": "2.1.2",
"phpunit/phpunit": "9.6.38|10.5.66|11.4.4|11.5.58|12.5.45"
},
"type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
"dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
"SlevomatCodingStandard\\": "SlevomatCodingStandard/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
"keywords": [
"dev",
"phpcs"
],
"support": {
"issues": "https://github.com/slevomat/coding-standard/issues",
"source": "https://github.com/slevomat/coding-standard/tree/8.32.0"
},
"funding": [
{
"url": "https://github.com/kukulich",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
"type": "tidelift"
}
],
"time": "2026-11-26T06:14:25+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "bbdc3d0532623e21838b7041a4364383a8126f96"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/bbdc3d0532623e21838b7041a4364383a8126f96",
"reference": "bbdc3d0532623e21838b7041a4364383a8126f96",
"shasum": ""
},
"require": {
"ext-libxml": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=7.2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
},
"suggest": {
"ext-iconv": "For accurate character length calculation when the checked files contain multi-byte characters.",
"ext-pcntl": "For parallel processing support via the --parallel CLI option."
},
"bin": [
"bin/phpcbf",
"bin/phpcs"
],
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "Former lead"
},
{
"name": "Juliette Reinders Folmer",
"role": "Current lead"
},
{
"name": "Contributors",
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.",
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards",
"static analysis"
],
"support": {
"issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
"security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
"source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
},
"funding": [
{
"url": "https://github.com/PHPCSStandards",
"type": "github"
},
{
"url": "https://github.com/jrfnl",
"type": "github"
},
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
},
{
"url": "https://thanks.dev/u/gh/phpcsstandards",
"type": "thanks_dev"
}
],
"time": "2026-08-06T02:45:27+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {},
"platform-dev": {},
"platform-overrides": {
"php": "8.4.1"
},
"plugin-api-version": "2.6.0"
}