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 @@
-
+