Skip to content

TASK: Prepare tests for PHPUnit 12 - #184

Merged
kdambekalns merged 2 commits into
neos:mainfrom
kdambekalns:task/prepare-phpunit-12
Aug 26, 2026
Merged

kdambekalns merged 2 commits into
neos:mainfrom
kdambekalns:task/prepare-phpunit-12

Conversation

@kdambekalns

Copy link
Copy Markdown
Member

No description provided.

MockBuilder::addMethods() is removed in PHPUnit 12 without replacement.

All occurrences here are the ['dummy'] idiom, meaning "mock a method that does
not exist so that none of the real ones get replaced". Since PHPUnit 10
onlyMethods([]) expresses exactly that:

* getAccessibleMock(X::class, ['dummy']) becomes getAccessibleMock(X::class, []).
* On a raw mock builder, addMethods(['dummy']) becomes ->onlyMethods([]).
  Dropping the call entirely would be wrong - without any onlyMethods()/
  addMethods() call the builder mocks *every* method.
The two validators in `getValidatorsReturnsPreviouslyAddedValidators`
have no expectations on them, so a stub is the fitting double.
@kdambekalns kdambekalns self-assigned this Aug 25, 2026

@mhsdesign mhsdesign left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks harmless thanks.

Cannot say anything regarding which branch to target or which version this will be released in ... dont do things in the form package;)

@kdambekalns
kdambekalns merged commit a1872e9 into neos:main Aug 26, 2026
5 checks passed
@kdambekalns
kdambekalns deleted the task/prepare-phpunit-12 branch August 26, 2026 11:09
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