Skip to content

fix(nc35): register OpenRegister PSR-4 prefix without OC_App - #1103

Merged
rubenvdlinde merged 3 commits into
developmentfrom
claude/nc35-support
Oct 6, 2026
Merged

rubenvdlinde merged 3 commits into
developmentfrom
claude/nc35-support

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Part of the fleet-wide Nextcloud 35 rollout (see ConductionNL/decidiq#1616). thematiq already declares NC35, but OpenRegisterAutoloader::ensure() still called the private \OC_App::registerAutoloading(), which Nextcloud 35 removed; the error was swallowed, so on NC35 the OpenRegister integration was silently off. It now registers a PSR-4 loader with the public IAppManager + spl_autoload_register (as in keepiq#712), keeping ensure()'s signature. Also OCP\Util::getVersion() -> OCP\ServerVersion.

Commits

  • fix(nc35): register OpenRegister PSR-4 prefix without OC_App
  • chore(nc35): use OCP\ServerVersion instead of deprecated Util::getVersion

Validation and open risks

OpenRegisterAutoloaderTest OK (8) on OCP 34 and 35; PlaygroundStateServiceTest OK (17); ComplianceReportServiceTest OK (17); Mail tests OK against both the stable34 and stable35 OC\Mail\EMailTemplate (signatures unchanged; still a private parent class).

Merge order

Land ConductionNL/openregister#4406 first (CI installs openregister development).

🤖 Generated with Claude Code

https://claude.ai/code/session_01M7DxSg7d7wqqZsUppLWf7J


Generated by Claude Code

claude added 3 commits October 6, 2026 09:33
OpenRegisterAutoloader::ensure() called \OC_App::registerAutoloading(),
which Nextcloud 35 removed. The Error was swallowed by the catch-all, so
ensure() returned false and the federated-config listener was never
registered on 35. Register a PSR-4 loader for OCA\OpenRegister\ over the
openregister app's lib/ with spl_autoload_register(), using only public
IAppManager::isEnabledForAnyone() and getAppPath(). ensure()'s signature
and call site are unchanged; it still never throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7DxSg7d7wqqZsUppLWf7J
…sion

OCP\Util::getVersion() is deprecated since 31; this app's floor is 32,
so OCP\ServerVersion is always available. Resolved lazily from the
server container, keeping the existing Throwable fallbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7DxSg7d7wqqZsUppLWf7J
The hydra phpcs gate rejects \OCP\Server::get() in lib/ (global container
lookup), and the extra class reference pushed ComplianceReportService over
the phpmd CouplingBetweenObjects limit. ServerVersion is now an optional
constructor dependency of ComplianceReportService and PlaygroundStateService
(autowired by the container on every supported server, 32+); without it the
existing fallbacks ("unknown" / 0) apply, as before in isolated unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7DxSg7d7wqqZsUppLWf7J
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/thematiq @ 8fe83b1

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
format ✅
test-fonts ✅
test-token-set-coverage ✅
composer ✅ ✅ 107/107
npm ✅ ✅ 2/2
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ✅
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-06 10:42 UTC

Download the full PDF report from the workflow artifacts.

Copy link
Copy Markdown
Contributor Author

CI triage for this PR:

Fixed in this PR (26f945b): PHP Quality (phpcs) and PHP Quality (phpmd). \OCP\ServerVersion is now injected through the constructor (no global \OCP\Server::get() lookup), which also brings ComplianceReportService back under the CouplingBetweenObjects limit. Both checks are green on the new head.

Not caused by this PR:

  • PHPUnit (PHP 8.3, NC stable35, pgsql) has two failures, both about the zuiddrecht token set:

    • TokenReferenceDocsTest::testTheCommittedPagesAreCurrent: docs/reference/token-sets/zuiddrecht.md is stale (82 vs 88 declared tokens).
    • TokenSetVocabularyTest::testEveryShippedSetIsCompleteOrAllowListed: --nldesign-website-nav-current-color and --nldesign-website-nav-current-in-line are declared but nothing reads them.

    Both come from development @ 135a115 (feat(token-sets): Zuiddrecht gets a light website hero and a blue piece under the current menu item #1099). It added the hero/nav-current tokens to css/tokens/zuiddrecht.css without regenerating the reference page, and the Code Quality push run for that commit is red too (run 37372822129). This PR touches neither file. Fix on development: run composer docs:token-reference, and either consume or drop the two nav-current tokens (or allow-list the set).

  • Quality Report only aggregates the above.


Generated by Claude Code

@rubenvdlinde
rubenvdlinde merged commit e4a39ea into development Oct 6, 2026
41 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants