Skip to content

test: implement Nextcloud 36 SimpleFS folder listing in FakeFolder - #9527

Merged
vitormattos merged 2 commits into
mainfrom
fix/nextcloud36-isimplefolder-unit-fake
Nov 17, 2026
Merged

vitormattos merged 2 commits into
mainfrom
fix/nextcloud36-isimplefolder-unit-fake

Conversation

@vitormattos

@vitormattos vitormattos commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix the PHPUnit class-loading failures against Nextcloud 36/master by updating both LibreSign test doubles implementing OCP\Files\SimpleFS\ISimpleFolder, without changing Nextcloud or LibreSign production code.

Nextcloud 36 added ISimpleFolder::getFolderListing(): array. Both test classes lacked it, which caused fatal errors while PHPUnit built its suite:

  1. tests/php/Unit/Service/FolderServiceTest.php: FakeFolder (the first failure, identified in PR fix: freeze the PDF certification level with the request snapshot #9375).
  2. tests/php/Unit/Service/Install/DependencyStorageTest.php: InMemoryDependencyFolder (the next failure after fixing FakeFolder).

Both now implement the required method. FakeFolder returns an empty listing; InMemoryDependencyFolder returns its in-memory child folders. The methods also remain compatible with earlier Nextcloud versions.

Evidence and scope

  • Previous CI on PR fix: freeze the PDF certification level with the request snapshot #9375: PHPUnit failed loading FakeFolder, citing missing getFolderListing().
  • First CI run of this PR: that error disappeared, but revealed the same missing method on InMemoryDependencyFolder across SQLite, MySQL, MariaDB and PostgreSQL.
  • GitHub code search for implements ISimpleFolder found two concrete implementing test classes; both are covered now. Other matching files reference the interface without implementing it.
  • Latest head: cdc2f36829a9bd69e3b6c81795286cd73ec28bb8.
  • Validation of the full PHPUnit matrix on the latest head is pending GitHub Actions. Do not mistake the previous failing run for the current head.
  • Changes are limited to the two PHPUnit fixture files, 10 added lines in two independently signed DCO commits.

After this fix merges into main, PR #9375 can be rebased and reviewed separately for its DocMDP transition tests.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos requested a review from a team as a code owner November 16, 2026 23:22
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

Note: Metrics describe the revision analyzed by the successful PHPUnit run. Newer commits with pending, canceled or failed checks may not yet be represented in this report.

main (6749ef4) #9527 (667dbd1) +/-
Coverage 76.8% 76.8% 0.0%
Test Execution Time 3m42s 2m39s -1m3s
Details
  |                     | main (6749ef4) | #9527 (667dbd1) |  +/-  |
  |---------------------|----------------|-----------------|-------|
  | Coverage            |          76.8% |           76.8% |  0.0% |
  |   Files             |            511 |             511 |     0 |
  |   Lines             |          28843 |           28843 |     0 |
  |   Covered           |          22154 |           22154 |     0 |
+ | Test Execution Time |          3m42s |           2m39s | -1m3s |

Reported by octocov

@vitormattos
vitormattos merged commit 0bf2e8b into main Nov 17, 2026
80 checks passed
@vitormattos
vitormattos deleted the fix/nextcloud36-isimplefolder-unit-fake branch November 17, 2026 11:33
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