Remove Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::providerSource()

Created on 30 March 2024, 3 months ago
Updated 9 June 2024, 18 days ago

Problem/Motivation

in 📌 [PHPUnit 10] @dataProvider methods must be declared static and public Postponed we set all data provider methods to static, however the provider source in MigrateSourceTestBase is a special case, being an abstract method in a base class widely extended in contrib migrate modules. Having the abstract class declared static will prevent extending classes from having a version of code that works with both 10.2 and 10.3. While our BC promise does not apply to test classes, this particular case will be fairly disruptive, and we should avoid it if we can.

Steps to reproduce

Proposed resolution

Remove the abstract class and document that extending classes should implement the providerSource method as a static method. Current code will continue to work until the full switchover to phpUnit 10 in D11. This will allow modules to have code that works with both 10.2 and 10.3 by not declaring the method static, and code that works with both 10.3 and 10.4/11.0 by adding a static declaration when they are ready.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.2

Component
PHPUnit 

Last updated about 11 hours ago

Created by

🇺🇸United States mikelutz Michigan, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024