Skip to content

TASK: Replace removed and deprecated PhpUnit mock APIs in test - #4176

Merged
kdambekalns merged 1 commit into
neos:9.2from
kdambekalns:task/prepare-phpunit-12
Aug 26, 2026
Merged

kdambekalns merged 1 commit into
neos:9.2from
kdambekalns:task/prepare-phpunit-12

Conversation

@kdambekalns

Copy link
Copy Markdown
Member

getMockForAbstractClass() is removed in PHPUnit 12 without replacement; for a plain interface createMock() is the direct equivalent.

The same file still used MockBuilder::setMethods(), which was already removed in PHPUnit 10 - it stayed unnoticed because every test in this class is skipped. Renamed to onlyMethods() so the file does not fatal the day these tests are revived.

getMockForAbstractClass() is removed in PHPUnit 12 without replacement; for a
plain interface createMock() is the direct equivalent.

The same file still used MockBuilder::setMethods(), which was already removed
in PHPUnit 10 - it stayed unnoticed because every test in this class is
skipped. Renamed to onlyMethods() so the file does not fatal the day these
tests are revived.
@mhsdesign

Copy link
Copy Markdown
Member

We are targeting with this batch of changes 9.2 deliberately right because we want to make it PHPUnit 12 compatible ... or Neos 9.3 but definitely not Neos 9.1 or 9.0 right?

Makes fully sense, can be merged directly if you like one approval for this minor change is enough for this in Ui land;)

@kdambekalns

Copy link
Copy Markdown
Member Author

We are targeting […] 9.2 deliberately […] or Neos 9.3 but definitely not Neos 9.1 or 9.0 right?

Exactly.

@kdambekalns
kdambekalns merged commit d7534ed into neos:9.2 Aug 26, 2026
6 checks passed
@kdambekalns
kdambekalns deleted the task/prepare-phpunit-12 branch August 26, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants