Skip to content

fix(tests): parse info.xml from a string, and format the connection registry files - #644

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/format-and-libxml-info-xml
Sep 16, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/format-and-libxml-info-xml

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What this changes

Two things, both needed to get Code Quality closer to green on development.

The info.xml test could not pass in CI. It called simplexml_load_file(). Under the Nextcloud bootstrap, lib/base.php installs a libxml external entity loader that returns null, and that resolver also handles the primary document, so the call returns false for a perfectly well formed manifest and the test reports "Failed asserting that false is not false". Reading the bytes with file_get_contents() and parsing a string never goes through that loader. A short comment at the site says why, so nobody reverts it.

Prettier. The connection registry wave merged some files unformatted, so Frontend Check (format) failed. Prettier 3.9.6 is pinned, so this is unformatted code and not tooling drift.

Verified locally

  • npm run format passes, npm run lint reports 0 errors (its warnings are inherited debt and are untouched)
  • Every formatted file was checked to be exactly what prettier produces from the previous version, so the JavaScript change is pure formatting
  • The libxml behaviour was reproduced directly: with a null external entity loader installed, simplexml_load_file() returns false on the real appinfo/info.xml while simplexml_load_string() parses it

A local PHPUnit green does not by itself prove the CI failure is gone, because the local bootstrap does not load base.php. The reproduction above is the evidence.

🤖 Generated with Claude Code

…egistry files

simplexml_load_file() returns false under the Nextcloud bootstrap, because
lib/base.php installs a libxml external entity loader that returns null and
that resolver also handles the primary document. Reading the bytes and
parsing a string never touches it.

Also runs prettier over the files the connection registry wave merged
unformatted, so the Frontend Check (format) job passes.
@rubenvdlinde
rubenvdlinde merged commit 97199bf into development Sep 16, 2026
32 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 8a87b86

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
format
check-schema-l10n
composer ✅ 104/104
npm ✅ 534/534
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 on any branch from the Actions tab, or locally with npx playwright test.
Hydra gates

Quality workflow — 2026-09-16 06:59 UTC

Download the full PDF report from the workflow artifacts.

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.

1 participant