Fix #1661 : Use bin/setup for plugin manipulation to avoid plugin failures

This commit is contained in:
Romain Neutron
2014-02-03 17:24:57 +01:00
parent 142c221be2
commit a66f158dbb
6 changed files with 29 additions and 3 deletions

View File

@@ -30,6 +30,19 @@ abstract class AbstractPluginCommand extends Command
return $manifests;
}
protected function doExecute(InputInterface $input, OutputInterface $output)
{
if (basename($_SERVER['PHP_SELF']) === 'console') {
$output->writeln("");
$output->writeln(sprintf('<error> /!\ </error> <comment>Warning</comment>, this command is deprecated and will be removed as of Phraseanet 3.9, please use <info>bin/setup %s</info> instead <error> /!\ </error>', $this->getName()));
$output->writeln("");
}
return $this->doExecutePluginAction($input, $output);
}
abstract protected function doExecutePluginAction(InputInterface $input, OutputInterface $output);
protected function updateConfigFiles(InputInterface $input, OutputInterface $output)
{
$manifests = $this->validatePlugins($input, $output);