From 129f62c0fe0ddbe701c9b612bbac76ea1997333e Mon Sep 17 00:00:00 2001 From: Michel Weimerskirch Date: Sat, 8 Jan 2011 14:47:08 +0100 Subject: [PATCH] Fix for the regular expression in the getEntityManager method. Only "entity_manager" services should be returned; "entity_manager.*" have to be excluded. This was necessary in order to make "app/console doctrine:generate:entities" work again. --- src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php index 6dc4f1db99cb9..4dd835b1bc221 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php @@ -121,7 +121,7 @@ protected function getDoctrineEntityManagers() $entityManagers = array(); $ids = $this->container->getServiceIds(); foreach ($ids as $id) { - preg_match('/doctrine.orm.(.*)_entity_manager/', $id, $matches); + preg_match('/^doctrine.orm.(.*)_entity_manager$/', $id, $matches); if ($matches) { $name = $matches[1]; $entityManagers[$name] = $this->container->get($id);