diff --git a/core/modules/book/lib/Drupal/book/BookBundle.php b/core/modules/book/lib/Drupal/book/BookBundle.php index a184142..d995625 100644 --- a/core/modules/book/lib/Drupal/book/BookBundle.php +++ b/core/modules/book/lib/Drupal/book/BookBundle.php @@ -9,6 +9,7 @@ use Drupal\Core\Database\Connection; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\Bundle\Bundle; /** @@ -20,7 +21,7 @@ class BookBundle extends Bundle { * Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build(). */ public function build(ContainerBuilder $container) { - $container->register('book.manager', 'Drupal\book\Service\BookManager'); - // ->addArgument(new Connection('database')); + $container->register('book.manager', 'Drupal\book\Service\BookManager') + ->addArgument(new Reference('database')); } } diff --git a/core/modules/book/lib/Drupal/book/Controller/BookController.php b/core/modules/book/lib/Drupal/book/Controller/BookController.php index 55e1922..b40ba9f 100644 --- a/core/modules/book/lib/Drupal/book/Controller/BookController.php +++ b/core/modules/book/lib/Drupal/book/Controller/BookController.php @@ -17,7 +17,7 @@ class BookController implements ControllerInterface { /** * Injects BookManager Service. */ - public static function create() { + public static function create(ContainerInterface $container) { return new static($container->get('book.manager')); }