Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Drupal\TestTools\PhpUnitCompatibility\PhpUnit10;
/**
* Drupal's forward compatibility layer with multiple versions of PHPUnit.
*
* @internal
*/
trait TestCompatibilityTrait {
/**
* Gets @covers defined on the test class.
*
* @return string[]
* An array of classes listed with the @covers annotation.
*/
public function getTestClassCovers(): array {
$ret = [];
foreach ($this->valueObjectForEvents()->metadata()->isCovers()->isClassLevel() as $metadata) {
$ret[] = $metadata->target();
}
return $ret;
}
}

View File

@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Drupal\TestTools\PhpUnitCompatibility\PhpUnit11;
/**
* Drupal's forward compatibility layer with multiple versions of PHPUnit.
*
* @internal
*/
trait TestCompatibilityTrait {
}

View File

@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace Drupal\TestTools\PhpUnitCompatibility;
use PHPUnit\Runner\Version;
/**
* Helper class to determine information about running PHPUnit version.
*
* This class contains static methods only and is not meant to be instantiated.
*/
final class RunnerVersion {
/**
* This class should not be instantiated.
*/
private function __construct() {
}
/**
* Returns the major version of the PHPUnit runner being used.
*
* @return int
* The major version of the PHPUnit runner being used.
*/
public static function getMajor() {
return (int) explode('.', Version::id())[0];
}
}