1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

Add a Command event triggered by all comands which load plugins

This commit is contained in:
Nils Adermann 2013-09-05 14:30:03 +02:00
parent bf08019292
commit d00ca4bcdb
12 changed files with 160 additions and 1 deletions

View file

@ -21,6 +21,8 @@ use Composer\Installer;
use Composer\Json\JsonFile;
use Composer\Json\JsonManipulator;
use Composer\Package\Version\VersionParser;
use Composer\Plugin\CommandEvent;
use Composer\Plugin\PluginEvents;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@ -106,6 +108,10 @@ EOT
$composer = $this->getComposer();
$composer->getDownloadManager()->setOutputProgress(!$input->getOption('no-progress'));
$io = $this->getIO();
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'require', $input, $output);
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
$install = Installer::create($io, $composer);
$install