Skip to content

Commit 000b0d3

Browse files
authored
chore: align nextcloud/ocp and info.xml with Nextcloud 34 (#25)
`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` - appinfo/info.xml: `<nextcloud min-version="30" max-version="34"/>` -> `min-version="32"` - composer.lock regenerated: nextcloud/ocp v31.0.9 -> v34.0.2 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. No `nextcloud-test-refs` change. This repo is a Python ExApp: there is no `lib/`, no PHP application source at all (the only PHP in the tree is `analysis-bootstrap.php` and `phpcs-custom-sniffs/`), no `phpunit.xml` and no `tests/`. `enable-phpunit` defaults to false in the shared workflow and this repo does not set it, so the PHPUnit matrix — the only consumer of `nextcloud-test-refs`, along with the newman / playwright / journeydoc jobs which are likewise off — never runs. Setting the input here would be dead configuration, so it is deliberately left absent.
1 parent 1daa979 commit 000b0d3

3 files changed

Lines changed: 117 additions & 11 deletions

File tree

‎appinfo/info.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This is an ExApp (External Application) - Nextcloud will automatically manage th
3636
</documentation>
3737

3838
<dependencies>
39-
<nextcloud min-version="30" max-version="34"/>
39+
<nextcloud min-version="32" max-version="34"/>
4040
</dependencies>
4141

4242
<external-app>

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
},
5757
"require-dev": {
5858
"nextcloud/coding-standard": "^1.4",
59-
"nextcloud/ocp": "^31.0",
59+
"nextcloud/ocp": "^34.0",
6060
"phpmd/phpmd": "^2.15",
6161
"phpmetrics/phpmetrics": "^2.8",
6262
"phpstan/phpstan": "^1.10",

‎composer.lock‎

Lines changed: 115 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)