aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/config/services.yml7
-rw-r--r--phpBB/download/file.php2
-rw-r--r--phpBB/includes/di/pass/collection.php (renamed from phpBB/includes/di/pass/cron.php)15
-rw-r--r--phpBB/install/database_update.php2
5 files changed, 15 insertions, 13 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index e24f9b4359..fb2f86341b 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -106,7 +106,7 @@ $phpbb_container = phpbb_create_compiled_container(
new phpbb_di_extension_core($phpbb_root_path),
),
array(
- new phpbb_di_pass_cron(),
+ new phpbb_di_pass_collection('cron.task_collection', 'cron.task'),
),
$phpbb_root_path,
$phpEx
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index 76a7049f19..42bb473e66 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -91,13 +91,6 @@ services:
- .%core.php_ext%
- @cache.driver
- processor.ext:
- class: phpbb_di_processor_ext
- arguments:
- - @ext.manager
- tags:
- - { name: container.processor }
-
request:
class: phpbb_request
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index eb1ec85afe..b99ce2d688 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -65,7 +65,7 @@ if (isset($_GET['avatar']))
new phpbb_di_extension_core($phpbb_root_path),
),
array(
- new phpbb_di_pass_cron(),
+ new phpbb_di_pass_collection('cron.task_collection', 'cron.task'),
),
$phpbb_root_path,
$phpEx
diff --git a/phpBB/includes/di/pass/cron.php b/phpBB/includes/di/pass/collection.php
index 53fe0a61c8..09e4b08f62 100644
--- a/phpBB/includes/di/pass/cron.php
+++ b/phpBB/includes/di/pass/collection.php
@@ -18,8 +18,17 @@ if (!defined('IN_PHPBB'))
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-class phpbb_di_pass_cron implements CompilerPassInterface
+class phpbb_di_pass_collection implements CompilerPassInterface
{
+ private $collection_service;
+ private $service_tag;
+
+ public function __construct($collection_service, $service_tag)
+ {
+ $this->collection_service = $collection_service;
+ $this->service_tag = $service_tag;
+ }
+
/**
* Modify the container before it is passed to the rest of the code
*
@@ -28,9 +37,9 @@ class phpbb_di_pass_cron implements CompilerPassInterface
*/
public function process(ContainerBuilder $container)
{
- $definition = $container->getDefinition('cron.task_collection');
+ $definition = $container->getDefinition($this->collection_service);
- foreach ($container->findTaggedServiceIds('cron.task') as $id => $data)
+ foreach ($container->findTaggedServiceIds($this->service_tag) as $id => $data)
{
$definition->addMethodCall('add', array($id));
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index a5c4e2acd3..bc45b27cdc 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -123,7 +123,7 @@ $phpbb_container = phpbb_create_compiled_container(
new phpbb_di_extension_core($phpbb_root_path),
),
array(
- new phpbb_di_pass_cron(),
+ new phpbb_di_pass_collection('cron.task_collection', 'cron.task'),
),
$phpbb_root_path,
$phpEx