summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-08-28 07:48:40 (GMT)
committerwebchick2012-08-28 07:48:40 (GMT)
commita642d32c7c3ea10bd4cc24f23e29788b18f863a3 (patch)
treed7124607ff86c451fb7f1f58e1a6d09eba504e8f
parentfd558951e898400b2e8cba6f47458bcdcddde2b2 (diff)
Issue #1759152 by katbailey: Add a database service to the DIC.
-rw-r--r--core/lib/Drupal/Core/CoreBundle.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index f8e8691..2c5d180 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -43,6 +43,14 @@ class CoreBundle extends Bundle
$container->register('language_manager', 'Drupal\Core\Language\LanguageManager')
->addArgument(new Reference('request'))
->setScope('request');
+ $container->register('database', 'Drupal\Core\Database\Connection')
+ ->setFactoryClass('Drupal\Core\Database\Database')
+ ->setFactoryMethod('getConnection')
+ ->addArgument('default');
+ $container->register('database.slave', 'Drupal\Core\Database\Connection')
+ ->setFactoryClass('Drupal\Core\Database\Database')
+ ->setFactoryMethod('getConnection')
+ ->addArgument('slave');
// @todo Replace below lines with the commented out block below it when it's
// performant to do so: http://drupal.org/node/1706064.
@@ -87,14 +95,6 @@ class CoreBundle extends Bundle
$container->register('request_close_subscriber', 'Drupal\Core\EventSubscriber\RequestCloseSubscriber')
->addTag('kernel.event_subscriber');
$container->register('config_global_override_subscriber', '\Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber');
- $container->register('database', 'Drupal\Core\Database\Connection')
- ->setFactoryClass('Drupal\Core\Database\Database')
- ->setFactoryMethod('getConnection')
- ->addArgument('default');
- $container->register('database.slave', 'Drupal\Core\Database\Connection')
- ->setFactoryClass('Drupal\Core\Database\Database')
- ->setFactoryMethod('getConnection')
- ->addArgument('slave');
$container->register('exception_listener', 'Symfony\Component\HttpKernel\EventListener\ExceptionListener')
->addTag('kernel.event_subscriber')
->addArgument(new Reference('service_container'))