From b95ab440280ca5e5e94fe1f96f4f947734e37da3 Mon Sep 17 00:00:00 2001 From: Carlo Date: Sat, 12 Jul 2014 17:19:43 +0200 Subject: [ticket/12685] Add console collection and fixing CLI Added a commands service collection and removed CLI container PHPBB3-12685 --- phpBB/phpbb/console/application.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'phpBB/phpbb/console/application.php') diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php index b1f0635913..72fcee5cfa 100644 --- a/phpBB/phpbb/console/application.php +++ b/phpBB/phpbb/console/application.php @@ -17,7 +17,7 @@ use Symfony\Component\Console\Shell; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\DependencyInjection\TaggedContainerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; class application extends \Symfony\Component\Console\Application { @@ -73,14 +73,13 @@ class application extends \Symfony\Component\Console\Application /** * Register a set of commands from the container * - * @param TaggedContainerInterface $container The container - * @param string $tag The tag used to register the commands + * @param ContainerInterface $container The container */ - public function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command') + public function register_container_commands(ContainerInterface $container) { - foreach($container->findTaggedServiceIds($tag) as $id => $void) + foreach($container->get('console.command_collection') as $service_command) { - $this->add($container->get($id)); + $this->add($service_command); } } -- cgit v1.2.1