mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-02 12:34:59 +02:00
[ticket/11998] Use container to get all commands using 'console.command' tag.
PHPBB3-11998
This commit is contained in:
parent
aec5b9d156
commit
5db1ec163d
@ -6,6 +6,7 @@ imports:
|
||||
- { resource: avatars.yml }
|
||||
- { resource: feed.yml }
|
||||
- { resource: auth_providers.yml }
|
||||
- { resource: console.yml }
|
||||
|
||||
services:
|
||||
acl.permissions:
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user