function Plugin::unpackOnCreateProject
Post create-project command event callback.
File
-
composer/
Plugin/ RecipeUnpack/ Plugin.php, line 148
Class
- Plugin
- Composer plugin for handling dependency unpacking.
Namespace
Drupal\Composer\Plugin\RecipeUnpackCode
public function unpackOnCreateProject(Event $event) : void {
$composer = $event->getComposer();
$unpackCollection = new UnpackCollection();
foreach ($composer->getRepositoryManager()
->getLocalRepository()
->getPackages() as $package) {
// Only recipes are supported.
if ($package->getType() === self::RECIPE_PACKAGE_TYPE) {
if ($this->manager->unpackOptions
->isIgnored($package)) {
$event->getIO()
->write(sprintf('<info>%s</info> not unpacked because it is ignored.', $package->getName()), verbosity: IOInterface::VERBOSE);
}
elseif (UnpackManager::isDevRequirement($package)) {
continue;
}
else {
$unpackCollection->add($package);
}
}
}
// Unpack any recipes that have been registered.
$this->manager
->unpack($unpackCollection);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.