X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fhttp-kernel%2FBundle%2FBundle.php;fp=vendor%2Fsymfony%2Fhttp-kernel%2FBundle%2FBundle.php;h=cfa576c367919ce726cb1b779c0b938fcc9b9e2e;hp=3b4e156c7a71615e91ac1bdf12fe49f3e481c7dc;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/symfony/http-kernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Bundle/Bundle.php index 3b4e156c7..cfa576c36 100644 --- a/vendor/symfony/http-kernel/Bundle/Bundle.php +++ b/vendor/symfony/http-kernel/Bundle/Bundle.php @@ -54,8 +54,6 @@ abstract class Bundle implements BundleInterface * * This method can be overridden to register compilation passes, * other extensions, ... - * - * @param ContainerBuilder $container A ContainerBuilder instance */ public function build(ContainerBuilder $container) { @@ -159,8 +157,6 @@ abstract class Bundle implements BundleInterface * * * Commands are in the 'Command' sub-directory * * Commands extend Symfony\Component\Console\Command\Command - * - * @param Application $application An Application instance */ public function registerCommands(Application $application) { @@ -183,13 +179,16 @@ abstract class Bundle implements BundleInterface } $class = $ns.'\\'.$file->getBasename('.php'); if ($this->container) { + $commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : array(); $alias = 'console.command.'.strtolower(str_replace('\\', '_', $class)); - if ($this->container->has($alias)) { + if (isset($commandIds[$alias]) || $this->container->has($alias)) { continue; } } $r = new \ReflectionClass($class); if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) { + @trigger_error(sprintf('Auto-registration of the command "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Use PSR-4 based service discovery instead.', $class), E_USER_DEPRECATED); + $application->add($r->newInstance()); } }