function TemplateProjectTestBase::unboundCoreConstraints

Changes constraints for core packages to `*`.

Parameters

string[] $constraints: A set of version constraints, like you'd find in the `require` or `require-dev` sections of `composer.json`. This array is modified by reference.

File

core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php, line 379

Class

TemplateProjectTestBase
Base class for tests which create a test site from a core project template.

Namespace

Drupal\Tests\package_manager\Build

Code

private static function unboundCoreConstraints(array &$constraints) : void {
    $names = preg_grep('/^drupal\\/core-?/', array_keys($constraints));
    foreach ($names as $name) {
        $constraints[$name] = '*';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.