function FixtureManipulator::validateComposer

Validate the fixtures still passes `composer validate`.

File

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

Class

FixtureManipulator
Manipulates a test fixture using Composer commands.

Namespace

Drupal\fixture_manipulator

Code

private function validateComposer() : void {
  /** @var \PhpTuf\ComposerStager\API\Process\Service\ComposerProcessRunnerInterface $runner */
  $runner = \Drupal::service(ComposerProcessRunnerInterface::class);
  $runner->run([
    'validate',
    '--check-lock',
    '--no-check-publish',
    '--with-dependencies',
    '--no-interaction',
    '--ansi',
    '--no-cache',
    "--working-dir={$this->dir}",
    // Unlike ComposerInspector::validate(), explicitly do NOT validate
    // plugins, to allow for testing edge cases.
'--no-plugins',
    // Dummy packages are not meant for publishing, so do not validate that.
'--no-check-publish',
    '--no-check-version',
  ]);
}

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