diff --git a/lib/Doctrine/ORM/Cache/CacheFactory.php b/lib/Doctrine/ORM/Cache/CacheFactory.php index 79339219900..b915100623a 100644 --- a/lib/Doctrine/ORM/Cache/CacheFactory.php +++ b/lib/Doctrine/ORM/Cache/CacheFactory.php @@ -22,9 +22,8 @@ use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\EntityManagerInterface; - -use Doctrine\ORM\Persisters\CollectionPersister; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; /** * Contract for building second level cache regions components. @@ -37,22 +36,22 @@ interface CacheFactory /** * Build an entity persister for the given entity metadata. * - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param \Doctrine\ORM\Persisters\EntityPersister $persister The entity persister that will be cached. - * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $persister The entity persister that will be cached. + * @param \Doctrine\ORM\Mapping\ClassMetadata $metadata The entity metadata. * - * @return \Doctrine\ORM\Cache\Persister\CachedEntityPersister + * @return \Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister */ public function buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata); /** * Build a collection persister for the given relation mapping. * - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param \Doctrine\ORM\Persisters\CollectionPersister $persister The collection persister that will be cached. - * @param array $mapping The association mapping. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param array $mapping The association mapping. * - * @return \Doctrine\ORM\Cache\Persister\CachedCollectionPersister + * @return \Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister */ public function buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, array $mapping); diff --git a/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php b/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php index 207c34a6157..3fb12eadd32 100644 --- a/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php +++ b/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php @@ -29,14 +29,14 @@ use Doctrine\ORM\Cache\Region\DefaultRegion; use Doctrine\ORM\Cache\Region\FileLockRegion; use Doctrine\ORM\Cache\Region\UpdateTimestampCache; -use Doctrine\ORM\Persisters\EntityPersister; -use Doctrine\ORM\Persisters\CollectionPersister; -use Doctrine\ORM\Cache\Persister\ReadOnlyCachedEntityPersister; -use Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister; -use Doctrine\ORM\Cache\Persister\ReadOnlyCachedCollectionPersister; -use Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister; -use Doctrine\ORM\Cache\Persister\NonStrictReadWriteCachedEntityPersister; -use Doctrine\ORM\Cache\Persister\NonStrictReadWriteCachedCollectionPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; +use Doctrine\ORM\Cache\Persister\Entity\ReadOnlyCachedEntityPersister; +use Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister; +use Doctrine\ORM\Cache\Persister\Collection\ReadOnlyCachedCollectionPersister; +use Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister; +use Doctrine\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersister; +use Doctrine\ORM\Cache\Persister\Collection\NonStrictReadWriteCachedCollectionPersister; /** * @since 2.5 diff --git a/lib/Doctrine/ORM/Cache/Persister/AbstractCollectionPersister.php b/lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php similarity index 92% rename from lib/Doctrine/ORM/Cache/Persister/AbstractCollectionPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php index c6b377c0725..33d437253a1 100644 --- a/lib/Doctrine/ORM/Cache/Persister/AbstractCollectionPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php @@ -18,12 +18,12 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Collection; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\Cache\EntityCacheKey; use Doctrine\ORM\Cache\CollectionCacheKey; -use Doctrine\ORM\Persisters\CollectionPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; use Doctrine\ORM\PersistentCollection; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Cache\Region; @@ -46,7 +46,7 @@ abstract class AbstractCollectionPersister implements CachedCollectionPersister protected $metadataFactory; /** - * @var \Doctrine\ORM\Persisters\CollectionPersister + * @var \Doctrine\ORM\Persisters\Collection\CollectionPersister */ protected $persister; @@ -91,10 +91,10 @@ abstract class AbstractCollectionPersister implements CachedCollectionPersister protected $cacheLogger; /** - * @param \Doctrine\ORM\Persisters\CollectionPersister $persister The collection persister that will be cached. - * @param \Doctrine\ORM\Cache\Region $region The collection region. - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param array $association The association mapping. + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param \Doctrine\ORM\Cache\Region $region The collection region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param array $association The association mapping. */ public function __construct(CollectionPersister $persister, Region $region, EntityManagerInterface $em, array $association) { diff --git a/lib/Doctrine/ORM/Cache/Persister/CachedCollectionPersister.php b/lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php similarity index 93% rename from lib/Doctrine/ORM/Cache/Persister/CachedCollectionPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php index 2318c590693..5722027c49d 100644 --- a/lib/Doctrine/ORM/Cache/Persister/CachedCollectionPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Collection/CachedCollectionPersister.php @@ -18,10 +18,11 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Collection; use Doctrine\ORM\Cache\CollectionCacheKey; -use Doctrine\ORM\Persisters\CollectionPersister; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; use Doctrine\ORM\PersistentCollection; /** diff --git a/lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersister.php b/lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php similarity index 98% rename from lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php index 8c682762af4..86e5c8f9ffd 100644 --- a/lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php @@ -18,7 +18,7 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Collection; use Doctrine\ORM\Cache\CollectionCacheKey; use Doctrine\ORM\PersistentCollection; diff --git a/lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedCollectionPersister.php b/lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php similarity index 97% rename from lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedCollectionPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php index 20890e87d8c..4f35ceb10dc 100644 --- a/lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedCollectionPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php @@ -18,7 +18,7 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Collection; use Doctrine\ORM\PersistentCollection; use Doctrine\ORM\Cache\CacheException; diff --git a/lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedCollectionPersister.php b/lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php similarity index 87% rename from lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedCollectionPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php index be11531d9f9..a92ed20d302 100644 --- a/lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedCollectionPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php @@ -18,11 +18,10 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Collection; -use Doctrine\ORM\Persisters\CollectionPersister; +use Doctrine\ORM\Persisters\Collection\CollectionPersister; use Doctrine\ORM\EntityManagerInterface; - use Doctrine\ORM\Cache\CollectionCacheKey; use Doctrine\ORM\Cache\ConcurrentRegion; use Doctrine\ORM\PersistentCollection; @@ -34,10 +33,10 @@ class ReadWriteCachedCollectionPersister extends AbstractCollectionPersister { /** - * @param \Doctrine\ORM\Persisters\CollectionPersister $persister The collection persister that will be cached. - * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The collection region. - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param array $association The association mapping. + * @param \Doctrine\ORM\Persisters\Collection\CollectionPersister $persister The collection persister that will be cached. + * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The collection region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param array $association The association mapping. */ public function __construct(CollectionPersister $persister, ConcurrentRegion $region, EntityManagerInterface $em, array $association) { diff --git a/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php similarity index 96% rename from lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php index c051a38d0ab..eae4c8c3343 100644 --- a/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php @@ -18,7 +18,7 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Entity; use Doctrine\ORM\Cache; use Doctrine\ORM\Cache\Region; @@ -26,10 +26,11 @@ use Doctrine\ORM\Cache\CollectionCacheKey; use Doctrine\ORM\Cache\TimestampCacheKey; use Doctrine\ORM\Cache\QueryCacheKey; +use Doctrine\ORM\Cache\Persister\CachedPersister; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\PersistentCollection; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; use Doctrine\Common\Util\ClassUtils; use Doctrine\Common\Collections\Criteria; @@ -51,7 +52,7 @@ abstract class AbstractEntityPersister implements CachedEntityPersister protected $metadataFactory; /** - * @var \Doctrine\ORM\Persisters\EntityPersister + * @var \Doctrine\ORM\Persisters\Entity\EntityPersister */ protected $persister; @@ -108,10 +109,10 @@ abstract class AbstractEntityPersister implements CachedEntityPersister protected $joinedAssociations; /** - * @param \Doctrine\ORM\Persisters\EntityPersister $persister The entity persister to cache. - * @param \Doctrine\ORM\Cache\Region $region The entity cache region. - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $persister The entity persister to cache. + * @param \Doctrine\ORM\Cache\Region $region The entity cache region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. */ public function __construct(EntityPersister $persister, Region $region, EntityManagerInterface $em, ClassMetadata $class) { diff --git a/lib/Doctrine/ORM/Cache/Persister/CachedEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php similarity index 91% rename from lib/Doctrine/ORM/Cache/Persister/CachedEntityPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php index adf5fa0c6ee..0c9078cec72 100644 --- a/lib/Doctrine/ORM/Cache/Persister/CachedEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Entity/CachedEntityPersister.php @@ -18,10 +18,11 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Entity; use Doctrine\ORM\Cache\EntityCacheKey; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Cache\Persister\CachedPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; /** * Interface for second level cache entity persisters. diff --git a/lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php similarity index 98% rename from lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php index ca7f8bc2d11..b120ae2fae4 100644 --- a/lib/Doctrine/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php @@ -18,7 +18,7 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Entity; use Doctrine\Common\Util\ClassUtils; use Doctrine\ORM\Cache\EntityCacheKey; diff --git a/lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php similarity index 96% rename from lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedEntityPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php index 69db37f60e1..ce93d7b0e61 100644 --- a/lib/Doctrine/ORM/Cache/Persister/ReadOnlyCachedEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php @@ -18,7 +18,7 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Entity; use Doctrine\ORM\Cache\CacheException; use Doctrine\Common\Util\ClassUtils; diff --git a/lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php similarity index 88% rename from lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedEntityPersister.php rename to lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php index 1b3af3ab7de..0f65e4c9bfa 100644 --- a/lib/Doctrine/ORM/Cache/Persister/ReadWriteCachedEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php @@ -18,12 +18,11 @@ * . */ -namespace Doctrine\ORM\Cache\Persister; +namespace Doctrine\ORM\Cache\Persister\Entity; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\EntityManagerInterface; - use Doctrine\ORM\Cache\ConcurrentRegion; use Doctrine\ORM\Cache\EntityCacheKey; @@ -36,10 +35,10 @@ class ReadWriteCachedEntityPersister extends AbstractEntityPersister { /** - * @param \Doctrine\ORM\Persister\EntityPersister $persister The entity persister to cache. - * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The entity cache region. - * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. - * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. + * @param \Doctrine\ORM\Persister\Entity\EntityPersister $persister The entity persister to cache. + * @param \Doctrine\ORM\Cache\ConcurrentRegion $region The entity cache region. + * @param \Doctrine\ORM\EntityManagerInterface $em The entity manager. + * @param \Doctrine\ORM\Mapping\ClassMetadata $class The entity metadata. */ public function __construct(EntityPersister $persister, ConcurrentRegion $region, EntityManagerInterface $em, ClassMetadata $class) { diff --git a/lib/Doctrine/ORM/LazyCriteriaCollection.php b/lib/Doctrine/ORM/LazyCriteriaCollection.php index 4c6155d7046..28e2709ac35 100644 --- a/lib/Doctrine/ORM/LazyCriteriaCollection.php +++ b/lib/Doctrine/ORM/LazyCriteriaCollection.php @@ -23,8 +23,8 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\Selectable; -use Doctrine\ORM\Persisters\BasicEntityPersister; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; /** * A lazy collection that allow a fast count when using criteria object diff --git a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php b/lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php similarity index 98% rename from lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php rename to lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php index 669cc22f268..b73744ee4a2 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/Collection/AbstractCollectionPersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Collection; use Doctrine\ORM\EntityManager; use Doctrine\ORM\UnitOfWork; diff --git a/lib/Doctrine/ORM/Persisters/CollectionPersister.php b/lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php similarity index 98% rename from lib/Doctrine/ORM/Persisters/CollectionPersister.php rename to lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php index 855b85a308d..36b5706a078 100644 --- a/lib/Doctrine/ORM/Persisters/CollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Collection; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\PersistentCollection; diff --git a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php b/lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/ManyToManyPersister.php rename to lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php index 50cf89a5643..40b1be95800 100644 --- a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php @@ -17,10 +17,12 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Collection; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Persisters\SqlExpressionVisitor; +use Doctrine\ORM\Persisters\SqlValueVisitor; use Doctrine\ORM\PersistentCollection; use Doctrine\ORM\Query; diff --git a/lib/Doctrine/ORM/Persisters/OneToManyPersister.php b/lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php similarity index 98% rename from lib/Doctrine/ORM/Persisters/OneToManyPersister.php rename to lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php index f610942cc3a..ee550a92200 100644 --- a/lib/Doctrine/ORM/Persisters/OneToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php @@ -17,11 +17,10 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Collection; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\PersistentCollection; -use Doctrine\ORM\UnitOfWork; /** * Persister for one-to-many collections. diff --git a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php b/lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php similarity index 98% rename from lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php rename to lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php index 42224957985..36d84d41596 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Entity; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\DBAL\Types\Type; diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/BasicEntityPersister.php rename to lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php index 5947c67d5af..e6d79696cd5 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Entity; use Doctrine\DBAL\LockMode; use Doctrine\DBAL\Types\Type; @@ -31,6 +31,8 @@ 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; diff --git a/lib/Doctrine/ORM/Persisters/EntityPersister.php b/lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/EntityPersister.php rename to lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php index 7a0190a1677..55887eefa8f 100644 --- a/lib/Doctrine/ORM/Persisters/EntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Entity; use Doctrine\ORM\PersistentCollection; use Doctrine\Common\Collections\Criteria; diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php rename to lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php index d2321dc10b1..b1bd56d8c88 100644 --- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Entity; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Query\ResultSetMapping; diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/SingleTablePersister.php rename to lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php index 5b60f06a0a1..d0148f9cfce 100644 --- a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php +++ b/lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php @@ -17,7 +17,7 @@ * . */ -namespace Doctrine\ORM\Persisters; +namespace Doctrine\ORM\Persisters\Entity; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\Common\Collections\Criteria; diff --git a/lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php b/lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php index 7736943c6fb..f23bfa3da9a 100644 --- a/lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php +++ b/lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php @@ -25,6 +25,7 @@ use Doctrine\Common\Collections\Expr\Comparison; use Doctrine\Common\Collections\Expr\Value; use Doctrine\Common\Collections\Expr\CompositeExpression; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; /** * Visit Expressions and generate SQL WHERE conditions from them. @@ -35,7 +36,7 @@ class SqlExpressionVisitor extends ExpressionVisitor { /** - * @var \Doctrine\ORM\Persisters\BasicEntityPersister + * @var \Doctrine\ORM\Persisters\Entity\BasicEntityPersister */ private $persister; @@ -45,7 +46,8 @@ class SqlExpressionVisitor extends ExpressionVisitor private $classMetadata; /** - * @param \Doctrine\ORM\Persisters\BasicEntityPersister $persister + * @param \Doctrine\ORM\Persisters\Entity\BasicEntityPersister $persister + * @param \Doctrine\ORM\Mapping\ClassMetadata $classMetadata */ public function __construct(BasicEntityPersister $persister, ClassMetadata $classMetadata) { diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php index 393353cdc8e..94e29e22b36 100644 --- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -25,7 +25,7 @@ use Doctrine\Common\Util\ClassUtils; use Doctrine\Common\Proxy\Proxy as BaseProxy; use Doctrine\Common\Proxy\ProxyGenerator; -use Doctrine\ORM\Persisters\EntityPersister; +use Doctrine\ORM\Persisters\Entity\EntityPersister; use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityNotFoundException; use Doctrine\ORM\Utility\IdentifierFlattener; @@ -115,7 +115,7 @@ protected function createProxyDefinition($className) * Creates a closure capable of initializing a proxy * * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata - * @param \Doctrine\ORM\Persisters\EntityPersister $entityPersister + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $entityPersister * * @return \Closure * @@ -201,7 +201,7 @@ private function createInitializer(ClassMetadata $classMetadata, EntityPersister * Creates a closure capable of finalizing state a cloned proxy * * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata - * @param \Doctrine\ORM\Persisters\EntityPersister $entityPersister + * @param \Doctrine\ORM\Persisters\Entity\EntityPersister $entityPersister * * @return \Closure * diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index e91ff3d125e..5749273dc01 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -41,11 +41,11 @@ use Doctrine\ORM\Event\ListenersInvoker; use Doctrine\ORM\Cache\Persister\CachedPersister; -use Doctrine\ORM\Persisters\BasicEntityPersister; -use Doctrine\ORM\Persisters\SingleTablePersister; -use Doctrine\ORM\Persisters\JoinedSubclassPersister; -use Doctrine\ORM\Persisters\OneToManyPersister; -use Doctrine\ORM\Persisters\ManyToManyPersister; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\SingleTablePersister; +use Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister; +use Doctrine\ORM\Persisters\Collection\OneToManyPersister; +use Doctrine\ORM\Persisters\Collection\ManyToManyPersister; use Doctrine\ORM\Utility\IdentifierFlattener; /** @@ -3040,7 +3040,7 @@ public function size() * * @param string $entityName The name of the Entity. * - * @return \Doctrine\ORM\Persisters\EntityPersister + * @return \Doctrine\ORM\Persisters\Entity\EntityPersister */ public function getEntityPersister($entityName) { @@ -3084,7 +3084,7 @@ public function getEntityPersister($entityName) * * @param array $association * - * @return \Doctrine\ORM\Persisters\CollectionPersister + * @return \Doctrine\ORM\Persisters\Collection\CollectionPersister */ public function getCollectionPersister(array $association) { diff --git a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php index 4df977729e5..ac2157b5224 100644 --- a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php +++ b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php @@ -1,12 +1,13 @@ factory->buildCachedEntityPersister($em, $persister, $metadata); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\ReadOnlyCachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\ReadOnlyCachedEntityPersister', $cachedPersister); } public function testBuildCachedEntityPersisterReadWrite() @@ -88,8 +88,8 @@ public function testBuildCachedEntityPersisterReadWrite() $cachedPersister = $this->factory->buildCachedEntityPersister($em, $persister, $metadata); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', $cachedPersister); } public function testBuildCachedEntityPersisterNonStrictReadWrite() @@ -109,8 +109,8 @@ public function testBuildCachedEntityPersisterNonStrictReadWrite() $cachedPersister = $this->factory->buildCachedEntityPersister($em, $persister, $metadata); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\NonStrictReadWriteCachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersister', $cachedPersister); } public function testBuildCachedCollectionPersisterReadOnly() @@ -132,8 +132,8 @@ public function testBuildCachedCollectionPersisterReadOnly() $cachedPersister = $this->factory->buildCachedCollectionPersister($em, $persister, $mapping); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedCollectionPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\ReadOnlyCachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\ReadOnlyCachedCollectionPersister', $cachedPersister); } public function testBuildCachedCollectionPersisterReadWrite() @@ -154,8 +154,8 @@ public function testBuildCachedCollectionPersisterReadWrite() $cachedPersister = $this->factory->buildCachedCollectionPersister($em, $persister, $mapping); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedCollectionPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', $cachedPersister); } public function testBuildCachedCollectionPersisterNonStrictReadWrite() @@ -176,8 +176,8 @@ public function testBuildCachedCollectionPersisterNonStrictReadWrite() $cachedPersister = $this->factory->buildCachedCollectionPersister($em, $persister, $mapping); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedCollectionPersister', $cachedPersister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\NonStrictReadWriteCachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister', $cachedPersister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\NonStrictReadWriteCachedCollectionPersister', $cachedPersister); } public function testInheritedEntityCacheRegion() @@ -192,8 +192,8 @@ public function testInheritedEntityCacheRegion() $cachedPersister1 = $factory->buildCachedEntityPersister($em, $persister1, $metadata1); $cachedPersister2 = $factory->buildCachedEntityPersister($em, $persister2, $metadata2); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister1); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister2); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister1); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister2); $this->assertNotSame($cachedPersister1, $cachedPersister2); $this->assertSame($cachedPersister1->getCacheRegion(), $cachedPersister2->getCacheRegion()); @@ -211,8 +211,8 @@ public function testCreateNewCacheDriver() $cachedPersister1 = $factory->buildCachedEntityPersister($em, $persister1, $metadata1); $cachedPersister2 = $factory->buildCachedEntityPersister($em, $persister2, $metadata2); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister1); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $cachedPersister2); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister1); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $cachedPersister2); $this->assertNotSame($cachedPersister1, $cachedPersister2); $this->assertNotSame($cachedPersister1->getCacheRegion(), $cachedPersister2->getCacheRegion()); @@ -264,4 +264,4 @@ public function testInvalidFileLockRegionDirectoryException() 'region' => 'foo' )); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/AbstractCollectionPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php similarity index 90% rename from tests/Doctrine/Tests/ORM/Cache/Persister/AbstractCollectionPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php index e216cd79e04..c3db83a44e7 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/AbstractCollectionPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php @@ -1,12 +1,12 @@ em = $this->_getTestEntityManager(); $this->region = $this->createRegion(); - $this->collectionPersister = $this->getMock('Doctrine\ORM\Persisters\CollectionPersister', $this->collectionPersisterMockMethods); + $this->collectionPersister = $this->getMock('Doctrine\ORM\Persisters\Collection\CollectionPersister', $this->collectionPersisterMockMethods); } /** @@ -115,9 +115,9 @@ public function testImplementsEntityPersister() { $persister = $this->createPersisterDefault(); - $this->assertInstanceOf('Doctrine\ORM\Persisters\CollectionPersister', $persister); + $this->assertInstanceOf('Doctrine\ORM\Persisters\Collection\CollectionPersister', $persister); $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedPersister', $persister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedCollectionPersister', $persister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister', $persister); } public function testInvokeDelete() diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersisterTest.php similarity index 69% rename from tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersisterTest.php index 2a2b626926d..bd65c20777f 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedCollectionPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersisterTest.php @@ -1,11 +1,11 @@ createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -163,7 +163,7 @@ public function testTransactionRollBackUpdateShouldClearQueue() $persister = $this->createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -194,7 +194,7 @@ public function testTransactionRollCommitDeleteShouldClearQueue() $persister = $this->createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -225,7 +225,7 @@ public function testTransactionRollCommitUpdateShouldClearQueue() $persister = $this->createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -255,7 +255,7 @@ public function testDeleteLockFailureShouldIgnoreQueue() $persister = $this->createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -280,7 +280,7 @@ public function testUpdateLockFailureShouldIgnoreQueue() $persister = $this->createPersisterDefault(); $collection = $this->createCollection($entity); $key = new CollectionCacheKey(State::CLASSNAME, 'cities', array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedCollectionPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Collection\ReadWriteCachedCollectionPersister', 'queuedCache'); $property->setAccessible(true); @@ -298,4 +298,4 @@ public function testUpdateLockFailureShouldIgnoreQueue() $persister->update($collection); $this->assertCount(0, $property->getValue($persister)); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/AbstractEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php similarity index 94% rename from tests/Doctrine/Tests/ORM/Cache/Persister/AbstractEntityPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php index fcee102b97f..116339c87a1 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/AbstractEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php @@ -1,13 +1,13 @@ em = $this->_getTestEntityManager(); $this->region = $this->createRegion(); - $this->entityPersister = $this->getMock('Doctrine\ORM\Persisters\EntityPersister', $this->entityPersisterMockMethods); + $this->entityPersister = $this->getMock('Doctrine\ORM\Persisters\Entity\EntityPersister', $this->entityPersisterMockMethods); } /** @@ -120,9 +120,9 @@ public function testImplementsEntityPersister() { $persister = $this->createPersisterDefault(); - $this->assertInstanceOf('Doctrine\ORM\Persisters\EntityPersister', $persister); + $this->assertInstanceOf('Doctrine\ORM\Persisters\Entity\EntityPersister', $persister); $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedPersister', $persister); - $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\CachedEntityPersister', $persister); + $this->assertInstanceOf('Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister', $persister); } public function testInvokeAddInsert() diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php similarity index 90% rename from tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php index 13d7b0f3141..6cf3fea3b05 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/NonStrictReadWriteCachedEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php @@ -1,6 +1,6 @@ createPersisterDefault(); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -50,7 +50,7 @@ public function testInsertTransactionCommitShouldPutCache() $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); $entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo')); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -87,7 +87,7 @@ public function testUpdateTransactionCommitShouldPutCache() $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); $entry = new EntityCacheEntry(Country::CLASSNAME, array('id'=>1, 'name'=>'Foo')); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -115,7 +115,7 @@ public function testDeleteTransactionCommitShouldEvictCache() $entity = new Country("Foo"); $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -137,4 +137,4 @@ public function testDeleteTransactionCommitShouldEvictCache() $this->assertCount(0, $property->getValue($persister)); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/ReadOnlyCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php similarity index 83% rename from tests/Doctrine/Tests/ORM/Cache/Persister/ReadOnlyCachedEntityPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php index 2e21e23e967..716ea15cbdd 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/ReadOnlyCachedEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadOnlyCachedEntityPersisterTest.php @@ -1,13 +1,13 @@ update($entity); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Cache/Persister/ReadWriteCachedEntityPersisterTest.php b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersisterTest.php similarity index 94% rename from tests/Doctrine/Tests/ORM/Cache/Persister/ReadWriteCachedEntityPersisterTest.php rename to tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersisterTest.php index b95ddaef709..1f598a903a5 100644 --- a/tests/Doctrine/Tests/ORM/Cache/Persister/ReadWriteCachedEntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/ReadWriteCachedEntityPersisterTest.php @@ -1,6 +1,6 @@ createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -159,7 +159,7 @@ public function testTransactionCommitShouldClearQueue() $lock = Lock::createLockRead(); $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -189,7 +189,7 @@ public function testDeleteLockFailureShouldIgnoreQueue() $entity = new Country("Foo"); $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -213,7 +213,7 @@ public function testUpdateLockFailureShouldIgnoreQueue() $entity = new Country("Foo"); $persister = $this->createPersisterDefault(); $key = new EntityCacheKey(Country::CLASSNAME, array('id'=>1)); - $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\ReadWriteCachedEntityPersister', 'queuedCache'); + $property = new \ReflectionProperty('Doctrine\ORM\Cache\Persister\Entity\ReadWriteCachedEntityPersister', 'queuedCache'); $property->setAccessible(true); @@ -231,4 +231,4 @@ public function testUpdateLockFailureShouldIgnoreQueue() $persister->update($entity); $this->assertCount(0, $property->getValue($persister)); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.php b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.php index f8aff379075..4b978b1d661 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.php @@ -124,7 +124,7 @@ public function testPutAndLoadOneToManyRelation() $this->assertEquals($queryCount, $this->getCurrentQueryCount()); } - public function testLoadOnoToManyCollectionFromDatabaseWhenEntityMissing() + public function testLoadOneToManyCollectionFromDatabaseWhenEntityMissing() { $this->loadFixturesCountries(); $this->loadFixturesStates(); @@ -325,9 +325,9 @@ public function testOneToManyCount() $this->cache->evictCollectionRegion(State::CLASSNAME, 'cities'); $this->_em->clear(); - $entitiId = $this->states[0]->getId(); + $entityId = $this->states[0]->getId(); $queryCount = $this->getCurrentQueryCount(); - $entity = $this->_em->find(State::CLASSNAME, $entitiId); + $entity = $this->_em->find(State::CLASSNAME, $entityId); $this->assertEquals(2, $entity->getCities()->count()); $this->assertEquals($queryCount + 2, $this->getCurrentQueryCount()); @@ -335,7 +335,7 @@ public function testOneToManyCount() $this->_em->clear(); $queryCount = $this->getCurrentQueryCount(); - $entity = $this->_em->find(State::CLASSNAME, $entitiId); + $entity = $this->_em->find(State::CLASSNAME, $entityId); $this->assertEquals(2, $entity->getCities()->count()); $this->assertEquals($queryCount, $this->getCurrentQueryCount()); @@ -381,4 +381,4 @@ public function testCacheInitializeCollectionWithNewObjects() $this->assertEquals(4, $result->getTravels()->count()); } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php b/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php index ef9d72b2647..2f228f98bfd 100644 --- a/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/LazyCriteriaCollectionTest.php @@ -16,7 +16,7 @@ class LazyCriteriaCollectionTest extends PHPUnit_Framework_TestCase { /** - * @var \Doctrine\ORM\Persisters\EntityPersister|\PHPUnit_Framework_MockObject_MockObject + * @var \Doctrine\ORM\Persisters\Entity\EntityPersister|\PHPUnit_Framework_MockObject_MockObject */ private $persister; @@ -35,7 +35,7 @@ class LazyCriteriaCollectionTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->persister = $this->getMock('Doctrine\ORM\Persisters\EntityPersister'); + $this->persister = $this->getMock('Doctrine\ORM\Persisters\Entity\EntityPersister'); $this->criteria = new Criteria(); $this->lazyCriteriaCollection = new LazyCriteriaCollection($this->persister, $this->criteria); } diff --git a/tests/Doctrine/Tests/ORM/Performance/ProxyPerformanceTest.php b/tests/Doctrine/Tests/ORM/Performance/ProxyPerformanceTest.php index f06e273abdc..a43907f9ee5 100644 --- a/tests/Doctrine/Tests/ORM/Performance/ProxyPerformanceTest.php +++ b/tests/Doctrine/Tests/ORM/Performance/ProxyPerformanceTest.php @@ -24,7 +24,7 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\UnitOfWork; use Doctrine\ORM\Proxy\ProxyFactory; -use Doctrine\ORM\Persisters\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; /** * Performance test used to measure performance of proxy instantiation @@ -168,4 +168,4 @@ public function load(array $criteria, $entity = null, $assoc = null, array $hint { return $entity; } -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php index 8e9ac08dfb7..dd058f050a9 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php @@ -4,8 +4,7 @@ use Doctrine\Common\Collections\Criteria; use Doctrine\DBAL\Types\Type as DBALType; -use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Persisters\BasicEntityPersister; +use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; use Doctrine\Tests\Models\CustomType\CustomTypeParent; use Doctrine\Tests\Models\CustomType\CustomTypeChild; use Doctrine\Tests\Models\CustomType\CustomTypeFriend; diff --git a/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php b/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php index 6c3bce3cf45..18145070fbe 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/JoinedSubclassPersisterTest.php @@ -19,13 +19,13 @@ namespace Doctrine\Tests\ORM\Persisters; -use Doctrine\ORM\Persisters\JoinedSubclassPersister; +use Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister; use Doctrine\Tests\OrmTestCase; /** - * Tests for {@see \Doctrine\ORM\Persisters\JoinedSubclassPersister} + * Tests for {@see \Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister} * - * @covers \Doctrine\ORM\Persisters\JoinedSubclassPersister + * @covers \Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister */ class JoinedSubClassPersisterTest extends OrmTestCase { diff --git a/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php b/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php index 227cd608a9d..a8a2adaba0d 100644 --- a/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php @@ -55,7 +55,7 @@ public function testReferenceProxyDelegatesLoadingToThePersister() { $identifier = array('id' => 42); $proxyClass = 'Proxies\__CG__\Doctrine\Tests\Models\ECommerce\ECommerceFeature'; - $persister = $this->getMock('Doctrine\ORM\Persisters\BasicEntityPersister', array('load'), array(), '', false); + $persister = $this->getMock('Doctrine\ORM\Persisters\Entity\BasicEntityPersister', array('load'), array(), '', false); $this->uowMock->setEntityPersister('Doctrine\Tests\Models\ECommerce\ECommerceFeature', $persister); $proxy = $this->proxyFactory->getProxy('Doctrine\Tests\Models\ECommerce\ECommerceFeature', $identifier); @@ -88,7 +88,7 @@ public function testSkipAbstractClassesOnGeneration() */ public function testFailedProxyLoadingDoesNotMarkTheProxyAsInitialized() { - $persister = $this->getMock('Doctrine\ORM\Persisters\BasicEntityPersister', array('load'), array(), '', false); + $persister = $this->getMock('Doctrine\ORM\Persisters\Entity\BasicEntityPersister', array('load'), array(), '', false); $this->uowMock->setEntityPersister('Doctrine\Tests\Models\ECommerce\ECommerceFeature', $persister); /* @var $proxy \Doctrine\Common\Proxy\Proxy */ @@ -115,7 +115,7 @@ public function testFailedProxyLoadingDoesNotMarkTheProxyAsInitialized() */ public function testFailedProxyCloningDoesNotMarkTheProxyAsInitialized() { - $persister = $this->getMock('Doctrine\ORM\Persisters\BasicEntityPersister', array('load'), array(), '', false); + $persister = $this->getMock('Doctrine\ORM\Persisters\Entity\BasicEntityPersister', array('load'), array(), '', false); $this->uowMock->setEntityPersister('Doctrine\Tests\Models\ECommerce\ECommerceFeature', $persister); /* @var $proxy \Doctrine\Common\Proxy\Proxy */