mirror of
https://github.com/composer/composer
synced 2025-05-08 16:17:37 +00:00
Add a Command event triggered by all comands which load plugins
This commit is contained in:
parent
bf08019292
commit
d00ca4bcdb
12 changed files with 160 additions and 1 deletions
|
@ -12,6 +12,8 @@
|
|||
|
||||
namespace Composer\Command;
|
||||
|
||||
use Composer\Plugin\CommandEvent;
|
||||
use Composer\Plugin\PluginEvents;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
@ -42,6 +44,10 @@ EOT
|
|||
$output->writeln('<info>Generating autoload files</info>');
|
||||
|
||||
$composer = $this->getComposer();
|
||||
|
||||
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'dump-autoload', $input, $output);
|
||||
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
||||
|
||||
$installationManager = $composer->getInstallationManager();
|
||||
$localRepo = $composer->getRepositoryManager()->getLocalRepository();
|
||||
$package = $composer->getPackage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue