Problem/Motivation

PHPUnit 10 deprecates use of non-static @dataProvider methods.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3443536

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

longwave created an issue. See original summary.

mondrake’s picture

Issue tags: +PHPUnit 10
longwave’s picture

Status: Active » Needs review

Fairly straightforward, move the mocks into the test method and control their creation via boolean flags - there were already if statements to handle them anyway.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a good refactor.

  • catch committed bb1fda53 on 10.3.x
    Issue #3443536 by longwave: Change @dataprovider to static in...

  • catch committed 773918e0 on 11.x
    Issue #3443536 by longwave: Change @dataprovider to static in...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!

  • catch committed 773918e0 on 11.0.x
    Issue #3443536 by longwave: Change @dataprovider to static in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.