Problem/Motivation

PHPUnit 13 deprecates usage of with*() without expects() in mocks.

See pipeline raw logs in #3574681: [Nov 2026] Introduce support for PHPUnit 13.5 for full report.

Proposed resolution

Before adopting PHPUnit 13, fix the usages, either converting the mocks to stubs, or adding explicit expectations on the calls to the mocked method.

In this issue, do a third round with a limited (tbd) number of fixes.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3629689

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Assigned: Unassigned » mondrake

On it

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Active » Needs review

These issues are incredibly tedious. Let’s do small steps.

dcam’s picture

Let’s do small steps.

Does that mean you want me to hold off on reviewing?

dcam’s picture

Nevermind. I got the impression that you intended to add more changes.

mondrake’s picture

#5 no no the contrary - I suggest doing just a few files in every issue - simpler to do (I do fixes with PHPUnit 13, then run the suite with the MR of the bump to make sure I do not get other overall errors, then apply selectively a diff to the MR of the individual issue, re run the suite on PHPUnit 12 to ensure I do not get errors on current HEAD), and to review (the changes never look obvious).

So please, DO review if you can ;)

dcam’s picture

Status: Needs review » Needs work

As usual, I looked at these changes and attempted to verify that after the modifications the tests are still testing the things we expect. I found one that I think didn't go far enough. In ConfigEntityMapperTest I think it's more appropriate to remove the $routeProvider property entirely.

mondrake’s picture

Status: Needs work » Needs review

Thanks. Done.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

mstrelan’s picture

Status: Reviewed & tested by the community » Needs review

I left a question on the MR, can set back to RTBC once it's answered.