diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php
index 522788e72..8108d558b 100644
--- a/lib/Doctrine/ORM/AbstractQuery.php
+++ b/lib/Doctrine/ORM/AbstractQuery.php
@@ -87,7 +87,7 @@ abstract class AbstractQuery
/**
* The entity manager used by this query object.
*
- * @var \Doctrine\ORM\EntityManager
+ * @var EntityManagerInterface
*/
protected $_em;
@@ -161,9 +161,9 @@ abstract class AbstractQuery
/**
* Initializes a new instance of a class derived from AbstractQuery.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param \Doctrine\ORM\EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->_em = $em;
$this->parameters = new ArrayCollection();
diff --git a/lib/Doctrine/ORM/Event/ListenersInvoker.php b/lib/Doctrine/ORM/Event/ListenersInvoker.php
index 125855bef..bbcbd4118 100644
--- a/lib/Doctrine/ORM/Event/ListenersInvoker.php
+++ b/lib/Doctrine/ORM/Event/ListenersInvoker.php
@@ -19,9 +19,9 @@
namespace Doctrine\ORM\Event;
-use Doctrine\ORM\Mapping\ClassMetadata;
-use Doctrine\ORM\EntityManager;
use Doctrine\Common\EventArgs;
+use Doctrine\ORM\EntityManagerInterface;
+use Doctrine\ORM\Mapping\ClassMetadata;
/**
* A method invoker based on entity lifecycle.
@@ -51,9 +51,9 @@ class ListenersInvoker
/**
* Initializes a new ListenersInvoker instance.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->eventManager = $em->getEventManager();
$this->resolver = $em->getConfiguration()->getEntityListenerResolver();
diff --git a/lib/Doctrine/ORM/Event/OnClearEventArgs.php b/lib/Doctrine/ORM/Event/OnClearEventArgs.php
index f37120573..dd827c725 100644
--- a/lib/Doctrine/ORM/Event/OnClearEventArgs.php
+++ b/lib/Doctrine/ORM/Event/OnClearEventArgs.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Event;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Provides event arguments for the onClear event.
@@ -33,7 +33,7 @@ use Doctrine\ORM\EntityManager;
class OnClearEventArgs extends \Doctrine\Common\EventArgs
{
/**
- * @var \Doctrine\ORM\EntityManager
+ * @var EntityManagerInterface
*/
private $em;
@@ -45,10 +45,10 @@ class OnClearEventArgs extends \Doctrine\Common\EventArgs
/**
* Constructor.
*
- * @param \Doctrine\ORM\EntityManager $em
- * @param string|null $entityClass Optional entity class.
+ * @param EntityManagerInterface $em
+ * @param string|null $entityClass Optional entity class.
*/
- public function __construct(EntityManager $em, $entityClass = null)
+ public function __construct(EntityManagerInterface $em, $entityClass = null)
{
$this->em = $em;
$this->entityClass = $entityClass;
diff --git a/lib/Doctrine/ORM/Event/OnFlushEventArgs.php b/lib/Doctrine/ORM/Event/OnFlushEventArgs.php
index c4f82a971..6a9c7c7f4 100644
--- a/lib/Doctrine/ORM/Event/OnFlushEventArgs.php
+++ b/lib/Doctrine/ORM/Event/OnFlushEventArgs.php
@@ -20,7 +20,7 @@
namespace Doctrine\ORM\Event;
use Doctrine\Common\EventArgs;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Provides event arguments for the preFlush event.
@@ -34,16 +34,16 @@ use Doctrine\ORM\EntityManager;
class OnFlushEventArgs extends EventArgs
{
/**
- * @var \Doctrine\ORM\EntityManager
+ * @var EntityManagerInterface
*/
private $em;
/**
* Constructor.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
diff --git a/lib/Doctrine/ORM/Event/PostFlushEventArgs.php b/lib/Doctrine/ORM/Event/PostFlushEventArgs.php
index f860b7fa9..860f2d33b 100644
--- a/lib/Doctrine/ORM/Event/PostFlushEventArgs.php
+++ b/lib/Doctrine/ORM/Event/PostFlushEventArgs.php
@@ -18,8 +18,8 @@
*/
namespace Doctrine\ORM\Event;
-use Doctrine\ORM\EntityManager;
use Doctrine\Common\EventArgs;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Provides event arguments for the postFlush event.
@@ -39,9 +39,9 @@ class PostFlushEventArgs extends EventArgs
/**
* Constructor.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
diff --git a/lib/Doctrine/ORM/Event/PreFlushEventArgs.php b/lib/Doctrine/ORM/Event/PreFlushEventArgs.php
index 4f49162b8..d01a92639 100644
--- a/lib/Doctrine/ORM/Event/PreFlushEventArgs.php
+++ b/lib/Doctrine/ORM/Event/PreFlushEventArgs.php
@@ -20,7 +20,7 @@
namespace Doctrine\ORM\Event;
use Doctrine\Common\EventArgs;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Provides event arguments for the preFlush event.
@@ -41,9 +41,9 @@ class PreFlushEventArgs extends EventArgs
/**
* Constructor.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
diff --git a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php
index b4161b29e..1077e9c3b 100644
--- a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php
+++ b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php
@@ -19,19 +19,19 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
abstract class AbstractIdGenerator
{
/**
* Generates an identifier for an entity.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
* @param \Doctrine\ORM\Mapping\Entity $entity
*
* @return mixed
*/
- abstract public function generate(EntityManager $em, $entity);
+ abstract public function generate(EntityManagerInterface $em, $entity);
/**
* Gets whether this generator is a post-insert generator which means that
diff --git a/lib/Doctrine/ORM/Id/AssignedGenerator.php b/lib/Doctrine/ORM/Id/AssignedGenerator.php
index 4e3321593..b2c2333e1 100644
--- a/lib/Doctrine/ORM/Id/AssignedGenerator.php
+++ b/lib/Doctrine/ORM/Id/AssignedGenerator.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\ORMException;
/**
@@ -36,16 +36,11 @@ class AssignedGenerator extends AbstractIdGenerator
/**
* Returns the identifier assigned to the given entity.
*
- * @param EntityManager $em
- * @param object $entity
- *
- * @return mixed
+ * {@inheritDoc}
*
* @throws \Doctrine\ORM\ORMException
- *
- * @override
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
$class = $em->getClassMetadata(get_class($entity));
$idFields = $class->getIdentifierFieldNames();
diff --git a/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php b/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php
index 1b4ed9a06..0a5c0273d 100644
--- a/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php
+++ b/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Id generator that obtains IDs from special "identity" columns. These are columns
@@ -48,15 +48,15 @@ class BigIntegerIdentityGenerator extends AbstractIdGenerator
}
/**
- * {@inheritdoc}
+ * {@inheritDoc}
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
- return (string)$em->getConnection()->lastInsertId($this->sequenceName);
+ return (string) $em->getConnection()->lastInsertId($this->sequenceName);
}
/**
- * {@inheritdoc}
+ * {@inheritDoc}
*/
public function isPostInsertGenerator()
{
diff --git a/lib/Doctrine/ORM/Id/IdentityGenerator.php b/lib/Doctrine/ORM/Id/IdentityGenerator.php
index 7945c6936..a026f4a02 100644
--- a/lib/Doctrine/ORM/Id/IdentityGenerator.php
+++ b/lib/Doctrine/ORM/Id/IdentityGenerator.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Id generator that obtains IDs from special "identity" columns. These are columns
@@ -48,9 +48,9 @@ class IdentityGenerator extends AbstractIdGenerator
}
/**
- * {@inheritdoc}
+ * {@inheritDoc}
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
return (int)$em->getConnection()->lastInsertId($this->sequenceName);
}
diff --git a/lib/Doctrine/ORM/Id/SequenceGenerator.php b/lib/Doctrine/ORM/Id/SequenceGenerator.php
index 545152254..b71a3409f 100644
--- a/lib/Doctrine/ORM/Id/SequenceGenerator.php
+++ b/lib/Doctrine/ORM/Id/SequenceGenerator.php
@@ -19,8 +19,8 @@
namespace Doctrine\ORM\Id;
+use Doctrine\ORM\EntityManagerInterface;
use Serializable;
-use Doctrine\ORM\EntityManager;
/**
* Represents an ID generator that uses a database sequence.
@@ -67,16 +67,9 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable
}
/**
- * Generates an ID for the given entity.
- *
- * @param EntityManager $em
- * @param object $entity
- *
- * @return integer The generated value.
- *
- * @override
+ * {@inheritDoc}
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) {
// Allocate new values
diff --git a/lib/Doctrine/ORM/Id/TableGenerator.php b/lib/Doctrine/ORM/Id/TableGenerator.php
index 34606fb22..809423285 100644
--- a/lib/Doctrine/ORM/Id/TableGenerator.php
+++ b/lib/Doctrine/ORM/Id/TableGenerator.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Id generator that uses a single-row database table and a hi/lo algorithm.
@@ -70,9 +70,9 @@ class TableGenerator extends AbstractIdGenerator
}
/**
- * {@inheritdoc}
+ * {@inheritDoc}
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) {
// Allocate new values
diff --git a/lib/Doctrine/ORM/Id/UuidGenerator.php b/lib/Doctrine/ORM/Id/UuidGenerator.php
index 901af806a..4287f2b1f 100644
--- a/lib/Doctrine/ORM/Id/UuidGenerator.php
+++ b/lib/Doctrine/ORM/Id/UuidGenerator.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Id;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Represents an ID generator that uses the database UUID expression
@@ -30,16 +30,9 @@ use Doctrine\ORM\EntityManager;
class UuidGenerator extends AbstractIdGenerator
{
/**
- * Generates an ID for the given entity.
- *
- * @param EntityManager $em The EntityManager to use.
- * @param object $entity
- *
- * @return string The generated value.
- *
- * @override
+ * {@inheritDoc}
*/
- public function generate(EntityManager $em, $entity)
+ public function generate(EntityManagerInterface $em, $entity)
{
$conn = $em->getConnection();
$sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression();
diff --git a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
index d7554b903..af232d1ff 100644
--- a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
+++ b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
@@ -19,11 +19,11 @@
namespace Doctrine\ORM\Internal\Hydration;
-use PDO;
use Doctrine\DBAL\Types\Type;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Events;
use Doctrine\ORM\Mapping\ClassMetadata;
+use PDO;
/**
* Base class for all hydrators. A hydrator is a class that provides some form
@@ -46,7 +46,7 @@ abstract class AbstractHydrator
/**
* The EntityManager instance.
*
- * @var EntityManager
+ * @var EntityManagerInterface
*/
protected $_em;
@@ -95,9 +95,9 @@ abstract class AbstractHydrator
/**
* Initializes a new instance of a class derived from AbstractHydrator.
*
- * @param \Doctrine\ORM\EntityManager $em The EntityManager to use.
+ * @param EntityManagerInterface $em The EntityManager to use.
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->_em = $em;
$this->_platform = $em->getConnection()->getDatabasePlatform();
diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php
index d0a6d2c6c..c79130c65 100644
--- a/lib/Doctrine/ORM/PersistentCollection.php
+++ b/lib/Doctrine/ORM/PersistentCollection.php
@@ -71,7 +71,7 @@ final class PersistentCollection implements Collection, Selectable
/**
* The EntityManager that manages the persistence of the collection.
*
- * @var \Doctrine\ORM\EntityManager
+ * @var \Doctrine\ORM\EntityManagerInterface
*/
private $em;
@@ -115,11 +115,11 @@ final class PersistentCollection implements Collection, Selectable
/**
* Creates a new persistent collection.
*
- * @param EntityManager $em The EntityManager the collection will be associated with.
- * @param ClassMetadata $class The class descriptor of the entity type of this collection.
- * @param Collection $coll The collection elements.
+ * @param EntityManagerInterface $em The EntityManager the collection will be associated with.
+ * @param ClassMetadata $class The class descriptor of the entity type of this collection.
+ * @param Collection $coll The collection elements.
*/
- public function __construct(EntityManager $em, $class, $coll)
+ public function __construct(EntityManagerInterface $em, $class, $coll)
{
$this->coll = $coll;
$this->em = $em;
diff --git a/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
index e6d79696c..537961420 100644
--- a/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
+++ b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
@@ -19,25 +19,23 @@
namespace Doctrine\ORM\Persisters\Entity;
-use Doctrine\DBAL\LockMode;
-use Doctrine\DBAL\Types\Type;
-use Doctrine\DBAL\Connection;
-
-use Doctrine\ORM\ORMException;
-use Doctrine\ORM\OptimisticLockException;
-use Doctrine\ORM\EntityManager;
-use Doctrine\ORM\UnitOfWork;
-use Doctrine\ORM\Query;
-use Doctrine\ORM\PersistentCollection;
-use Doctrine\ORM\Mapping\MappingException;
-use Doctrine\ORM\Mapping\ClassMetadata;
-use Doctrine\ORM\Persisters\SqlExpressionVisitor;
-use Doctrine\ORM\Persisters\SqlValueVisitor;
-use Doctrine\ORM\Utility\IdentifierFlattener;
-
-use Doctrine\Common\Util\ClassUtils;
use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\Expr\Comparison;
+use Doctrine\Common\Util\ClassUtils;
+use Doctrine\DBAL\Connection;
+use Doctrine\DBAL\LockMode;
+use Doctrine\DBAL\Types\Type;
+use Doctrine\ORM\EntityManagerInterface;
+use Doctrine\ORM\Mapping\ClassMetadata;
+use Doctrine\ORM\Mapping\MappingException;
+use Doctrine\ORM\OptimisticLockException;
+use Doctrine\ORM\ORMException;
+use Doctrine\ORM\PersistentCollection;
+use Doctrine\ORM\Persisters\SqlExpressionVisitor;
+use Doctrine\ORM\Persisters\SqlValueVisitor;
+use Doctrine\ORM\Query;
+use Doctrine\ORM\UnitOfWork;
+use Doctrine\ORM\Utility\IdentifierFlattener;
/**
* A BasicEntityPersister maps an entity to a single table in a relational database.
@@ -124,7 +122,7 @@ class BasicEntityPersister implements EntityPersister
/**
* The EntityManager instance.
*
- * @var \Doctrine\ORM\EntityManager
+ * @var EntityManagerInterface
*/
protected $em;
@@ -221,10 +219,10 @@ class BasicEntityPersister implements EntityPersister
* Initializes a new BasicEntityPersister that uses the given EntityManager
* and persists instances of the class described by the given ClassMetadata descriptor.
*
- * @param \Doctrine\ORM\EntityManager $em
- * @param \Doctrine\ORM\Mapping\ClassMetadata $class
+ * @param EntityManagerInterface $em
+ * @param ClassMetadata $class
*/
- public function __construct(EntityManager $em, ClassMetadata $class)
+ public function __construct(EntityManagerInterface $em, ClassMetadata $class)
{
$this->em = $em;
$this->class = $class;
diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php
index 94e29e22b..c6f1cbd3d 100644
--- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php
+++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php
@@ -21,12 +21,12 @@ namespace Doctrine\ORM\Proxy;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Proxy\AbstractProxyFactory;
-use Doctrine\Common\Proxy\ProxyDefinition;
-use Doctrine\Common\Util\ClassUtils;
use Doctrine\Common\Proxy\Proxy as BaseProxy;
+use Doctrine\Common\Proxy\ProxyDefinition;
use Doctrine\Common\Proxy\ProxyGenerator;
+use Doctrine\Common\Util\ClassUtils;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Persisters\Entity\EntityPersister;
-use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityNotFoundException;
use Doctrine\ORM\Utility\IdentifierFlattener;
@@ -41,7 +41,7 @@ use Doctrine\ORM\Utility\IdentifierFlattener;
class ProxyFactory extends AbstractProxyFactory
{
/**
- * @var \Doctrine\ORM\EntityManager The EntityManager this factory is bound to.
+ * @var EntityManagerInterface The EntityManager this factory is bound to.
*/
private $em;
@@ -66,13 +66,13 @@ class ProxyFactory extends AbstractProxyFactory
* Initializes a new instance of the ProxyFactory class that is
* connected to the given EntityManager.
*
- * @param \Doctrine\ORM\EntityManager $em The EntityManager the new factory works for.
- * @param string $proxyDir The directory to use for the proxy classes. It must exist.
- * @param string $proxyNs The namespace to use for the proxy classes.
- * @param boolean|int $autoGenerate The strategy for automatically generating proxy classes. Possible
- * values are constants of Doctrine\Common\Proxy\AbstractProxyFactory.
+ * @param EntityManagerInterface $em The EntityManager the new factory works for.
+ * @param string $proxyDir The directory to use for the proxy classes. It must exist.
+ * @param string $proxyNs The namespace to use for the proxy classes.
+ * @param boolean|int $autoGenerate The strategy for automatically generating proxy classes. Possible
+ * values are constants of Doctrine\Common\Proxy\AbstractProxyFactory.
*/
- public function __construct(EntityManager $em, $proxyDir, $proxyNs, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER)
+ public function __construct(EntityManagerInterface $em, $proxyDir, $proxyNs, $autoGenerate = AbstractProxyFactory::AUTOGENERATE_NEVER)
{
$proxyGenerator = new ProxyGenerator($proxyDir, $proxyNs);
diff --git a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php
index 80015a0a6..3c6daaaad 100644
--- a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php
+++ b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Query\Filter;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Query\ParameterTypeInferer;
@@ -37,7 +37,7 @@ abstract class SQLFilter
/**
* The entity manager.
*
- * @var EntityManager
+ * @var EntityManagerInterface
*/
private $em;
@@ -51,9 +51,9 @@ abstract class SQLFilter
/**
* Constructs the SQLFilter object.
*
- * @param EntityManager $em The entity manager.
+ * @param EntityManagerInterface $em The entity manager.
*/
- final public function __construct(EntityManager $em)
+ final public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
diff --git a/lib/Doctrine/ORM/Query/FilterCollection.php b/lib/Doctrine/ORM/Query/FilterCollection.php
index 3eb6b1a48..ffbaeaf12 100644
--- a/lib/Doctrine/ORM/Query/FilterCollection.php
+++ b/lib/Doctrine/ORM/Query/FilterCollection.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Query;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
/**
* Collection class for all the query filters.
@@ -74,9 +74,9 @@ class FilterCollection
/**
* Constructor.
*
- * @param EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
$this->config = $em->getConfiguration();
diff --git a/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php b/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
index 03fa9620f..413ac60bb 100644
--- a/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
+++ b/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
@@ -19,7 +19,7 @@
namespace Doctrine\ORM\Query;
-use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
/**
@@ -64,7 +64,7 @@ class ResultSetMappingBuilder extends ResultSetMapping
private $sqlCounter = 0;
/**
- * @var EntityManager
+ * @var EntityManagerInterface
*/
private $em;
@@ -76,10 +76,10 @@ class ResultSetMappingBuilder extends ResultSetMapping
private $defaultRenameMode;
/**
- * @param EntityManager $em
- * @param integer $defaultRenameMode
+ * @param EntityManagerInterface $em
+ * @param integer $defaultRenameMode
*/
- public function __construct(EntityManager $em, $defaultRenameMode = self::COLUMN_RENAMING_NONE)
+ public function __construct(EntityManagerInterface $em, $defaultRenameMode = self::COLUMN_RENAMING_NONE)
{
$this->em = $em;
$this->defaultRenameMode = $defaultRenameMode;
diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php
index 36dc2d7fe..0dda54c7a 100644
--- a/lib/Doctrine/ORM/QueryBuilder.php
+++ b/lib/Doctrine/ORM/QueryBuilder.php
@@ -48,7 +48,7 @@ class QueryBuilder
/**
* The EntityManager used by this QueryBuilder.
*
- * @var EntityManager
+ * @var EntityManagerInterface
*/
private $_em;
@@ -147,9 +147,9 @@ class QueryBuilder
/**
* Initializes a new QueryBuilder that uses the given EntityManager.
*
- * @param EntityManager $em The EntityManager to use.
+ * @param EntityManagerInterface $em The EntityManager to use.
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->_em = $em;
$this->parameters = new ArrayCollection();
diff --git a/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php b/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php
index 2b6478be5..5196dc339 100644
--- a/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php
+++ b/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php
@@ -20,11 +20,11 @@
namespace Doctrine\ORM\Tools;
use Doctrine\Common\Persistence\Proxy;
+use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\PersistentCollection;
use Doctrine\ORM\UnitOfWork;
-use Doctrine\ORM\EntityManager;
/**
* Use this logger to dump the identity map during the onFlush event. This is useful for debugging
@@ -69,11 +69,11 @@ class DebugUnitOfWorkListener
/**
* Dumps the contents of the identity map into a stream.
*
- * @param EntityManager $em
+ * @param EntityManagerInterface $em
*
* @return void
*/
- public function dumpIdentityMap(EntityManager $em)
+ public function dumpIdentityMap(EntityManagerInterface $em)
{
$uow = $em->getUnitOfWork();
$identityMap = $uow->getIdentityMap();
diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php
index 5749273dc..bd64684a3 100644
--- a/lib/Doctrine/ORM/UnitOfWork.php
+++ b/lib/Doctrine/ORM/UnitOfWork.php
@@ -204,7 +204,7 @@ class UnitOfWork implements PropertyChangedListener
/**
* The EntityManager that "owns" this UnitOfWork instance.
*
- * @var \Doctrine\ORM\EntityManager
+ * @var EntityManagerInterface
*/
private $em;
@@ -287,9 +287,9 @@ class UnitOfWork implements PropertyChangedListener
/**
* Initializes a new UnitOfWork instance, bound to the given EntityManager.
*
- * @param \Doctrine\ORM\EntityManager $em
+ * @param EntityManagerInterface $em
*/
- public function __construct(EntityManager $em)
+ public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
$this->evm = $em->getEventManager();