function FixtureManipulator::doCommitChanges

Commits all the changes.

Parameters

string $dir: The directory to commit the changes to.

3 calls to FixtureManipulator::doCommitChanges()
ActiveFixtureManipulator::commitChanges in core/modules/package_manager/tests/modules/fixture_manipulator/src/ActiveFixtureManipulator.php
FixtureManipulator::commitChanges in core/modules/package_manager/tests/modules/fixture_manipulator/src/FixtureManipulator.php
Commits the changes to the directory.
StageFixtureManipulator::begin in core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php

File

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

Class

FixtureManipulator
Manipulates a test fixture using Composer commands.

Namespace

Drupal\fixture_manipulator

Code

protected final function doCommitChanges(string $dir) : void {
    if ($this->committed) {
        throw new \BadMethodCallException('Already committed.');
    }
    $this->dir = $dir;
    $this->setUpRepos();
    $this->committingChanges = TRUE;
    $manipulator_arguments = $this->getQueuedManipulationItems();
    $this->clearQueuedManipulationItems();
    foreach ($manipulator_arguments as $method => $argument_sets) {
        // @todo Attempt to make fewer Composer calls in
        //   https://drupal.org/i/3345639.
        foreach ($argument_sets as $argument_set) {
            $this->{$method}(...$argument_set);
        }
    }
    $this->committed = TRUE;
    $this->committingChanges = FALSE;
    $this->validateComposer();
}

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