function UnpackManager::unpack
Unpacks the packages in the provided collection.
Parameters
\Drupal\Composer\Plugin\RecipeUnpack\UnpackCollection $unpackCollection: The collection of recipe packages to unpack.
File
-
composer/
Plugin/ RecipeUnpack/ UnpackManager.php, line 42
Class
- UnpackManager
- Manages the recipe unpacking process.
Namespace
Drupal\Composer\Plugin\RecipeUnpackCode
public function unpack(UnpackCollection $unpackCollection) : void {
if (count($unpackCollection) === 0) {
// Early return to avoid unnecessary work.
return;
}
foreach ($unpackCollection as $package) {
$unpacker = new Unpacker($package, $this->composer, $this->rootComposer, $unpackCollection, $this->unpackOptions, $this->io);
$unpacker->unpackDependencies();
$this->io
->write("<info>{$package->getName()}</info> unpacked.");
}
// Unpacking uses \Composer\Semver\Intervals::isSubsetOf() to choose between
// constraints.
Intervals::clear();
$this->rootComposer
->writeFiles();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.