From aa8df06000855b74e6ef3b93b66eaf0d857497a6 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Wed, 12 Aug 2026 13:00:20 +0200 Subject: [PATCH] chore: align nextcloud/ocp and info.xml with Nextcloud 34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nextcloud/ocp` is the API-surface stub that static analysis reads. It was pinned at `^31.0` while `appinfo/info.xml` declares support up to Nextcloud 34 — a major BELOW the declared minimum. Psalm and PHPStan were therefore analysing this app against Nextcloud 31: nothing added in 32/33/34 was visible to them, and — the part that actually bites — nothing REMOVED in 32/33/34 could be reported either. That is exactly why the NC 34 removal of `\OC::$server` needed a hand-written PHPCS sniff in this fleet. The type checker was looking at NC 31, where `\OC::$server` still exists, so it had nothing to complain about. A stub pinned below the declared maximum does not make the analysis lenient — it makes it blind in the one direction that matters for a version bump. Changes: - composer.json: nextcloud/ocp `^31.0` -> `^34.0` - composer.lock regenerated: nextcloud/ocp v31.0.9 -> v34.0.2 - appinfo/info.xml needed NO change: it already declares ``. The composer pin was the only half of the pair that was stale. The lock regeneration is not optional and it is the single thing that broke the equivalent rollout on the core apps. Changing `composer.json` alone makes `composer install` exit 4 with "package nextcloud/ocp is in the lock file as v31.0.9 but that does not satisfy your constraint ^34.0", and every PHP job fails before a single tool runs. Verified on this branch, both arms measured: - stale-lock control (composer.json ^31.0 + lock v34.0.2): `composer install --dry-run` exits 4 with exactly that message. - this branch: `composer install --dry-run` exits 0, 0 constraint conflicts. - `composer.lock` read back: nextcloud/ocp = v34.0.2. `nextcloud/ocp` v34 adds `psr/http-client` and `psr/http-message` to the lock; that is the whole of the rest of the lock diff. This repo has no `.github/workflows/code-quality.yml` at all, so there is no `nextcloud-test-refs` to move. (It is also a Python ExApp with no PHP application source, no phpunit.xml and no tests/, so the input would have nothing to drive even if the workflow existed.) --- composer.json | 2 +- composer.lock | 124 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 116 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index b22fead..a62b880 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "nextcloud/coding-standard": "^1.4", - "nextcloud/ocp": "^31.0", + "nextcloud/ocp": "^34.0", "phpmd/phpmd": "^2.15", "phpmetrics/phpmetrics": "^2.8", "phpstan/phpstan": "^1.10", diff --git a/composer.lock b/composer.lock index 4ac4f92..129538d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3947bc50f7c19ab12ac93a5f2ce5c5cb", + "content-hash": "f16623527a7ed6bac968d140b3f1bb94", "packages": [], "packages-dev": [ { @@ -841,29 +841,30 @@ }, { "name": "nextcloud/ocp", - "version": "v31.0.9", + "version": "v34.0.2", "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "abd32429d794ede1d92b7b0a88a1070371c907b5" + "reference": "81cbb2c594afe0fa978885bf7accd0440199520a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/abd32429d794ede1d92b7b0a88a1070371c907b5", - "reference": "abd32429d794ede1d92b7b0a88a1070371c907b5", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/81cbb2c594afe0fa978885bf7accd0440199520a", + "reference": "81cbb2c594afe0fa978885bf7accd0440199520a", "shasum": "" }, "require": { - "php": "~8.1 || ~8.2 || ~8.3 || ~8.4", + "php": "~8.2 || ~8.3 || ~8.4 || ~8.5", "psr/clock": "^1.0", "psr/container": "^2.0.2", "psr/event-dispatcher": "^1.0", + "psr/http-client": "^1.0.3", "psr/log": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-stable31": "31.0.0-dev" + "dev-stable34": "34.0.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -883,9 +884,9 @@ "description": "Composer package containing Nextcloud's public OCP API and the unstable NCU API", "support": { "issues": "https://github.com/nextcloud-deps/ocp/issues", - "source": "https://github.com/nextcloud-deps/ocp/tree/v31.0.9" + "source": "https://github.com/nextcloud-deps/ocp/tree/v34.0.2" }, - "time": "2025-07-31T00:57:37+00:00" + "time": "2026-07-16T01:28:13+00:00" }, { "name": "nikic/php-parser", @@ -2180,6 +2181,111 @@ }, "time": "2019-01-08T18:20:26+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, { "name": "psr/log", "version": "3.0.2",