aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/config/console.yml6
-rw-r--r--phpBB/phpbb/console/application.php11
2 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/config/console.yml b/phpBB/config/console.yml
index 00b8f9cec0..f4beb1c089 100644
--- a/phpBB/config/console.yml
+++ b/phpBB/config/console.yml
@@ -1,4 +1,10 @@
services:
+ console.command_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: console.command }
console.command.cache.purge:
class: phpbb\console\command\cache\purge
arguments:
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);
}
}