Skip to content

test: use PSR container in InjectionMiddlewareTest - #8403

Merged
vitormattos merged 2 commits into
mainfrom
fix/nc36-server-container-test
Sep 15, 2026
Merged

vitormattos merged 2 commits into
mainfrom
fix/nc36-server-container-test

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Summary

Fix InjectionMiddlewareTest on Nextcloud 36 after the removal of the deprecated OCP\IServerContainer interface.

The test instantiated OC\InitialStateService with a mock of OCP\IServerContainer. Nextcloud 36 removed that interface, while the current InitialStateService constructor accepts Psr\Container\ContainerInterface.

This PR replaces the obsolete mock with Psr\Container\ContainerInterface.

A repository-wide search found no other IServerContainer references in LibreSign.

Why

The PHPUnit jobs fail with:

PHPUnit\Framework\MockObject\Generator\UnknownTypeException:
Class or interface "OCP\IServerContainer" does not exist

This is triggered by the Nextcloud 36 server change, not by application behavior.

Scope

  • Test-only compatibility fix.
  • No production behavior changes.
  • No public API changes.
  • No backport planned; this is for main / Nextcloud 36 compatibility.

Validation

Expected to restore the failing InjectionMiddlewareTest cases in the PHPUnit matrix on Nextcloud 36.

@vitormattos
vitormattos requested a review from a team as a code owner September 15, 2026 01:49
@github-project-automation github-project-automation Bot moved this to 0. Backlog in Roadmap Sep 15, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos force-pushed the fix/nc36-server-container-test branch from 91e2ff8 to 0f36adc Compare September 15, 2026 01:51
@vitormattos vitormattos self-assigned this Sep 15, 2026
@vitormattos vitormattos added this to the Next Major (36) milestone Sep 15, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 182984e into main Sep 15, 2026
70 checks passed
@vitormattos
vitormattos deleted the fix/nc36-server-container-test branch September 15, 2026 02:18
@github-project-automation github-project-automation Bot moved this from 0. Backlog to 4. to release in Roadmap Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant