|
@@ -80,6 +80,25 @@ class Builder implements Capable, Capability, EventSubscriberInterface, PluginIn
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ protected function showCommands() {
|
|
|
+ $capabilities = $this->getCapabilities();
|
|
|
+ if (empty($capabilities[CommandProvider::class])) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $providerClass = $capabilities[CommandProvider::class];
|
|
|
+ /** @var \Composer\Plugin\Capability\CommandProvider $provider */
|
|
|
+ $provider = new $providerClass([
|
|
|
+ 'composer' => $this->composer,
|
|
|
+ 'io' => $io = $this->io,
|
|
|
+ 'plugin' => NULL,
|
|
|
+ ]);
|
|
|
+ $commands = $provider->getCommands();
|
|
|
+ $io->write("Available build commands:");
|
|
|
+ foreach ($commands as $command) {
|
|
|
+ $io->write("- " . $command->getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Event callback: run build:settings on post-install|update only.
|
|
|
*
|
|
@@ -96,6 +115,11 @@ class Builder implements Capable, Capability, EventSubscriberInterface, PluginIn
|
|
|
// FIXME without an argument, the command should build all templates.
|
|
|
// $buildCommand = new BuildSettingsCommand($event->getName());
|
|
|
// $buildCommand->run(new ArgvInput([]), new ConsoleOutput());
|
|
|
+
|
|
|
+ // Verbosity seems limited to 32, while the test expects 64 or 128.
|
|
|
+ if ($event->getIO()->isVerbose()) {
|
|
|
+ $this->showCommands();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|