Removing Doctrine\ORM\Mapping\Driver\Driver interface
Interface has been moved to Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
This commit is contained in:
parent
5b97357402
commit
905acf9176
@ -23,7 +23,7 @@ use Doctrine\Common\Cache\Cache,
|
||||
Doctrine\Common\Cache\ArrayCache,
|
||||
Doctrine\Common\Annotations\AnnotationRegistry,
|
||||
Doctrine\Common\Annotations\AnnotationReader,
|
||||
Doctrine\ORM\Mapping\Driver\Driver,
|
||||
Doctrine\Common\Persistence\Mapping\Driver\MappingDriver,
|
||||
Doctrine\ORM\Mapping\Driver\AnnotationDriver,
|
||||
Doctrine\ORM\Mapping\QuoteStrategy,
|
||||
Doctrine\ORM\Mapping\DefaultQuoteStrategy,
|
||||
@ -114,11 +114,11 @@ class Configuration extends \Doctrine\DBAL\Configuration
|
||||
/**
|
||||
* Sets the cache driver implementation that is used for metadata caching.
|
||||
*
|
||||
* @param Driver $driverImpl
|
||||
* @param MappingDriver $driverImpl
|
||||
* @todo Force parameter to be a Closure to ensure lazy evaluation
|
||||
* (as soon as a metadata cache is in effect, the driver never needs to initialize).
|
||||
*/
|
||||
public function setMetadataDriverImpl(Driver $driverImpl)
|
||||
public function setMetadataDriverImpl(MappingDriver $driverImpl)
|
||||
{
|
||||
$this->_attributes['metadataDriverImpl'] = $driverImpl;
|
||||
}
|
||||
@ -217,7 +217,7 @@ class Configuration extends \Doctrine\DBAL\Configuration
|
||||
* Gets the cache driver implementation that is used for the mapping metadata.
|
||||
*
|
||||
* @throws ORMException
|
||||
* @return Mapping\Driver\Driver
|
||||
* @return MappingDriver
|
||||
*/
|
||||
public function getMetadataDriverImpl()
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
|
||||
private $targetPlatform;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\ORM\Mapping\Driver\Driver
|
||||
* @var \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
|
||||
*/
|
||||
private $driver;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace Doctrine\ORM\Mapping\Driver;
|
||||
|
||||
use Doctrine\ORM\Mapping\Driver\Driver,
|
||||
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver,
|
||||
Doctrine\Common\Persistence\Mapping\ClassMetadata,
|
||||
Doctrine\ORM\Mapping\MappingException;
|
||||
|
||||
@ -34,7 +34,7 @@ use Doctrine\ORM\Mapping\Driver\Driver,
|
||||
* @author Roman Borschel <roman@code-factory.org>
|
||||
* @todo Rename: MappingDriverChain or MetadataDriverChain
|
||||
*/
|
||||
class DriverChain implements Driver
|
||||
class DriverChain implements MappingDriver
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
@ -71,10 +71,10 @@ class DriverChain implements Driver
|
||||
/**
|
||||
* Add a nested driver.
|
||||
*
|
||||
* @param Driver $nestedDriver
|
||||
* @param MappingDriver $nestedDriver
|
||||
* @param string $namespace
|
||||
*/
|
||||
public function addDriver(Driver $nestedDriver, $namespace)
|
||||
public function addDriver(MappingDriver $nestedDriver, $namespace)
|
||||
{
|
||||
$this->drivers[$namespace] = $nestedDriver;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Doctrine\Tests\Mocks;
|
||||
|
||||
class MetadataDriverMock implements \Doctrine\ORM\Mapping\Driver\Driver
|
||||
class MetadataDriverMock implements \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
|
||||
{
|
||||
public function loadMetadataForClass($className, \Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
public function testIsTransient()
|
||||
{
|
||||
$cmf = new ClassMetadataFactory();
|
||||
$driver = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver->expects($this->at(0))
|
||||
->method('isTransient')
|
||||
->with($this->equalTo('Doctrine\Tests\Models\CMS\CmsUser'))
|
||||
@ -136,7 +136,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
public function testIsTransientEntityNamespace()
|
||||
{
|
||||
$cmf = new ClassMetadataFactory();
|
||||
$driver = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver->expects($this->at(0))
|
||||
->method('isTransient')
|
||||
->with($this->equalTo('Doctrine\Tests\Models\CMS\CmsUser'))
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Mapping;
|
||||
|
||||
use Doctrine\ORM\Mapping\Driver\Driver;
|
||||
use Doctrine\ORM\Mapping\Driver\DriverChain;
|
||||
|
||||
require_once __DIR__ . '/../../TestInit.php';
|
||||
@ -16,13 +15,13 @@ class DriverChainTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
$chain = new DriverChain();
|
||||
|
||||
$driver1 = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver1 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver1->expects($this->never())
|
||||
->method('loadMetadataForClass');
|
||||
$driver1->expectS($this->never())
|
||||
->method('isTransient');
|
||||
|
||||
$driver2 = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver2 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver2->expects($this->at(0))
|
||||
->method('loadMetadataForClass')
|
||||
->with($this->equalTo($className), $this->equalTo($classMetadata));
|
||||
@ -57,12 +56,12 @@ class DriverChainTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
$chain = new DriverChain();
|
||||
|
||||
$driver1 = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver1 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver1->expects($this->once())
|
||||
->method('getAllClassNames')
|
||||
->will($this->returnValue(array('Doctrine\Tests\Models\Company\Foo')));
|
||||
|
||||
$driver2 = $this->getMock('Doctrine\ORM\Mapping\Driver\Driver');
|
||||
$driver2 = $this->getMock('Doctrine\Common\Persistence\Mapping\Driver\MappingDriver');
|
||||
$driver2->expects($this->once())
|
||||
->method('getAllClassNames')
|
||||
->will($this->returnValue(array('Doctrine\Tests\ORM\Mapping\Bar', 'Doctrine\Tests\ORM\Mapping\Baz', 'FooBarBaz')));
|
||||
|
Loading…
x
Reference in New Issue
Block a user