diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-11-03 03:24:06 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-11-03 03:24:06 +0100 |
commit | 5db1ec163d32c75cd13cddc4902b3c01733294ba (patch) | |
tree | 9d2fb67824c45cd1f02acac07075ff6c78b0e606 | |
parent | aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c (diff) | |
download | forums-5db1ec163d32c75cd13cddc4902b3c01733294ba.tar forums-5db1ec163d32c75cd13cddc4902b3c01733294ba.tar.gz forums-5db1ec163d32c75cd13cddc4902b3c01733294ba.tar.bz2 forums-5db1ec163d32c75cd13cddc4902b3c01733294ba.tar.xz forums-5db1ec163d32c75cd13cddc4902b3c01733294ba.zip |
[ticket/11998] Use container to get all commands using 'console.command' tag.
PHPBB3-11998
-rw-r--r-- | phpBB/config/services.yml | 1 | ||||
-rw-r--r-- | phpBB/console.php | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 7e3202d86b..f61ed5f87f 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -6,6 +6,7 @@ imports: - { resource: avatars.yml } - { resource: feed.yml } - { resource: auth_providers.yml } + - { resource: console.yml } services: acl.permissions: diff --git a/phpBB/console.php b/phpBB/console.php index 8699ea7b57..94f6c551fa 100644 --- a/phpBB/console.php +++ b/phpBB/console.php @@ -28,7 +28,11 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); $phpbb_class_loader->register(); +$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); + $application = new Application('phpBB Console', PHPBB_VERSION); -$application->addCommands(array( -)); +foreach($phpbb_container->findTaggedServiceIds('console.command') as $id => $void) +{ + $application->add($phpbb_container->get($id)); +} $application->run(); |