Skip to content
docsv0.13.1

ComposerRunnerInterface

Runs `composer require` on behalf of the plugin installer. The package never shells out by itself — the host provides the process implementation. A failed package STOPS the run (no further packages are attempted); the caller aborts and rolls back the installation.

ComposerRunnerInterface::requirePackages()

abstract public function requirePackages(string $workingDir, array $packages): Milpa\Plugin\Contracts\ComposerResult

Require the given packages inside $workingDir, stopping at the first failure.

Parameters

Parameters of requirePackages()
NameTypeDescription
$workingDirstringDirectory whose composer.json receives the requires.
$packagesarray<string, string>Package name => version constraint.