function RootComposer::getComposerManipulator

Retrieves the JSON manipulator for the contents of the root composer.json.

Return value

\Composer\Json\JsonManipulator The JSON manipulator.

File

composer/Plugin/RecipeUnpack/RootComposer.php, line 43

Class

RootComposer
Provides access to and manipulation of the root composer files.

Namespace

Drupal\Composer\Plugin\RecipeUnpack

Code

public function getComposerManipulator() : JsonManipulator {
    $this->composerManipulator ??= new JsonManipulator(file_get_contents(Factory::getComposerFile()));
    return $this->composerManipulator;
}

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