chore: align nextcloud/ocp and info.xml with Nextcloud 34 - #23
Merged
Conversation
`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
`<nextcloud min-version="32" max-version="34"/>`. 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.)
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.
nextcloud/ocpis the API-surface stub that static analysis reads. It waspinned at
^31.0whileappinfo/info.xmldeclares support up to Nextcloud34 — 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::$serverneeded ahand-written PHPCS sniff in this fleet. The type checker was looking at
NC 31, where
\OC::$serverstill exists, so it had nothing to complainabout. 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:
^31.0->^34.0<nextcloud min-version="32" max-version="34"/>. The composer pin wasthe 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.jsonalonemakes
composer installexit 4 with "package nextcloud/ocp is in the lockfile 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:
composer install --dry-runexits 4 with exactly that message.composer install --dry-runexits 0, 0 constraint conflicts.composer.lockread back: nextcloud/ocp = v34.0.2.nextcloud/ocpv34 addspsr/http-clientandpsr/http-messageto thelock; that is the whole of the rest of the lock diff.
This repo has no
.github/workflows/code-quality.ymlat all, so there is nonextcloud-test-refsto move. (It is also a Python ExApp with no PHPapplication source, no phpunit.xml and no tests/, so the input would have
nothing to drive even if the workflow existed.)