From 34f4ef529711ffcf2e597a379c27a3cadf629915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Thu, 13 Feb 2014 15:09:55 +0100 Subject: [PATCH] [FrameworkBundle][Console] Load command from DIC after command from bundles. It's better to load a command from DIC after other one. Because it allow easy override of default (symfony/assetic/doctrine) command. The end user could do: # config.yml services: assetic.command.dump: class: SensioLabs\Shim\Assetic\DumpCommand tags: - { name: console.command } --- .../Bundle/FrameworkBundle/Console/Application.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php index 224dbea2e09e3..02fda3e1b7a85 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php @@ -100,16 +100,16 @@ protected function registerCommands() { $container = $this->kernel->getContainer(); - if ($container->hasParameter('console.command.ids')) { - foreach ($container->getParameter('console.command.ids') as $id) { - $this->add($container->get($id)); - } - } - foreach ($this->kernel->getBundles() as $bundle) { if ($bundle instanceof Bundle) { $bundle->registerCommands($this); } } + + if ($container->hasParameter('console.command.ids')) { + foreach ($container->getParameter('console.command.ids') as $id) { + $this->add($container->get($id)); + } + } } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy