aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/di/pass/kernel_pass.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-11-18 15:51:05 -0500
committerDavid King <imkingdavid@gmail.com>2012-11-18 15:51:05 -0500
commit60c0a1dd2ac2c733a670093ad440e3ba6be3be4d (patch)
tree6fe079d379115043e7d3b60746dacfa5a4b6b8a8 /phpBB/includes/di/pass/kernel_pass.php
parent50a96a2a2d25734e3df451b0f821817213f085e6 (diff)
downloadforums-60c0a1dd2ac2c733a670093ad440e3ba6be3be4d.tar
forums-60c0a1dd2ac2c733a670093ad440e3ba6be3be4d.tar.gz
forums-60c0a1dd2ac2c733a670093ad440e3ba6be3be4d.tar.bz2
forums-60c0a1dd2ac2c733a670093ad440e3ba6be3be4d.tar.xz
forums-60c0a1dd2ac2c733a670093ad440e3ba6be3be4d.zip
[feature/controller] Don't use $user->lang() before container compilation
PHPBB3-10864
Diffstat (limited to 'phpBB/includes/di/pass/kernel_pass.php')
-rw-r--r--phpBB/includes/di/pass/kernel_pass.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/includes/di/pass/kernel_pass.php b/phpBB/includes/di/pass/kernel_pass.php
index d186ff2767..a701ebcfa6 100644
--- a/phpBB/includes/di/pass/kernel_pass.php
+++ b/phpBB/includes/di/pass/kernel_pass.php
@@ -29,7 +29,6 @@ class phpbb_di_pass_kernel_pass implements CompilerPassInterface
public function process(ContainerBuilder $container)
{
$definition = $container->getDefinition('dispatcher');
- $user = $container->get('user');
foreach ($container->findTaggedServiceIds('kernel.event_listener') as $id => $events)
{
@@ -39,12 +38,12 @@ class phpbb_di_pass_kernel_pass implements CompilerPassInterface
if (!isset($event['event']))
{
- throw new InvalidArgumentException($user->lang('NO_EVENT_ATTRIBUTE', $id));
+ throw new InvalidArgumentException(sprintf('Service "%1$s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
}
if (!isset($event['method']))
{
- throw new InvalidArgumentException($user->lang('NO_METHOD_ATTRIBUTE', $id));
+ throw new InvalidArgumentException(sprintf('Service "%1$s" must define the "method" attribute on "kernel.event_listener" tags.', $id));
}
$definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));
@@ -60,7 +59,7 @@ class phpbb_di_pass_kernel_pass implements CompilerPassInterface
$interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
if (!$refClass->implementsInterface($interface))
{
- throw new InvalidArgumentException($user->lang('SUBSCRIBER_WRONG_TYPE', $id, $interface));
+ throw new InvalidArgumentException(sprintf('Service "%1$s" must implement interface "%2$s".', $id, $interface));
}
$definition->addMethodCall('addSubscriberService', array($id, $class));