From 32070f5f6807d8878c6edf8d6c1ad055df1e57ba Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 27 Apr 2011 17:22:36 +0200 Subject: [PATCH] [DoctrineBundle] fixed service visibility --- .../Bundle/DoctrineBundle/Command/DoctrineCommand.php | 1 + src/Symfony/Bundle/DoctrineBundle/Resources/config/dbal.xml | 6 +++--- src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php index 99ce333845..8728174a27 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php @@ -102,6 +102,7 @@ abstract class DoctrineCommand extends Command { $connectionName = $name ?: $this->container->getParameter('doctrine.dbal.default_connection'); $connectionName = sprintf('doctrine.dbal.%s_connection', $connectionName); + if (!$this->container->has($connectionName)) { throw new \InvalidArgumentException(sprintf('Could not find a connection named %s', $name)); } diff --git a/src/Symfony/Bundle/DoctrineBundle/Resources/config/dbal.xml b/src/Symfony/Bundle/DoctrineBundle/Resources/config/dbal.xml index e242a8d646..67d4bc11ac 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Resources/config/dbal.xml +++ b/src/Symfony/Bundle/DoctrineBundle/Resources/config/dbal.xml @@ -34,10 +34,10 @@ - + - + - + diff --git a/src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml b/src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml index 62b720548e..95679c1fe8 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml +++ b/src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml @@ -59,6 +59,6 @@ - +