Problem/Motivation
As (soon to be) discovered by mglaman/phpstan-drupal 1.2.0 (see #3383279: Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again), we are using some deprecated functionality throughout Drupal core.
This issue is dealing with:
------ -------------------------------------------------------------
Line core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
------ -------------------------------------------------------------
29 Call to deprecated method setMethods() of class
PHPUnit\Framework\MockObject\MockBuilder:
https://github.com/sebastianbergmann/phpunit/pull/3687
------ -------------------------------------------------------------
Steps to reproduce
Proposed resolution
In #3130606: MockBuilder::setMethods is deprecated in PHPUnit8 and removed from PHPUnit10 we replaced all MockBuilder::setMethods() with MockBuilder::onlyMethods(), but in #3075608: Introduce TestRun objects and refactor TestDatabase to be testable we reintroduced one occurrence.
Let's replace that sole survivor in this issue.
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3383456
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:
- 3383456-replace-call-to
changes, plain diff MR !4646
Comments
Comment #3
spokjeComment #4
spokjeComment #5
spokjeComment #6
spokjeJust a fluke random failure, back to NR.
Comment #7
mondrakeThank you!
Comment #8
longwaveCommitted and pushed to 11.x and 10.2.x. Did not backport cleanly to 10.1.x, not sure it's worth the effort.