function FixtureManipulator::setVersion

Sets a package version.

Parameters

string $package_name: The package name.

string $version: The version.

bool $is_dev_requirement: Whether the package is a development requirement.

Return value

$this

1 call to FixtureManipulator::setVersion()
FixtureManipulator::setCorePackageVersion in core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php
Modifies core packages.

File

core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php, line 220

Class

FixtureManipulator
Manipulates a test fixture using Composer commands.

Namespace

Drupal\fixture_manipulator

Code

public function setVersion(string $package_name, string $version, bool $is_dev_requirement = FALSE) : self {
    if (!$this->committingChanges) {
        $this->queueManipulation('setVersion', func_get_args());
        return $this;
    }
    return $this->modifyPackageConfig($package_name, $version, [], $is_dev_requirement);
}

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