By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.2.x
Introduced in version:
10.2.0
Issue links:
Description:
@requires externalCommand is not a supported syntax in PHPUnit 10, and its parser no longer processes it. Drupal core previously used this to ensure Composer was available in build tests:
* @requires externalCommand composer
It has been replaced with a new trait that skips a test if Composer is not available. To use it simply add the trait to your test class:
use Drupal\TestTools\Extension\RequiresComposerTrait;
class MyTest extends TestCase {
use RequiresComposerTrait;
...
}
No further configuration is required.
Impacts:
Module developers