Fixed remaining Doctrine packages upgrade.
This commit is contained in:
parent
3bb803fd69
commit
918e2d2018
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\ORM\Mapping;
|
namespace Doctrine\ORM\Mapping;
|
||||||
|
|
||||||
abstract class Annotation {}
|
interface Annotation {}
|
||||||
|
|
||||||
|
|
||||||
/* Annotations */
|
/* Annotations */
|
||||||
@ -28,7 +28,7 @@ abstract class Annotation {}
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class Entity extends Annotation {
|
final class Entity implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $repositoryClass;
|
public $repositoryClass;
|
||||||
/** @var boolean */
|
/** @var boolean */
|
||||||
@ -39,7 +39,7 @@ final class Entity extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class MappedSuperclass extends Annotation {
|
final class MappedSuperclass implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $repositoryClass;
|
public $repositoryClass;
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ final class MappedSuperclass extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class InheritanceType extends Annotation {
|
final class InheritanceType implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ final class InheritanceType extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class DiscriminatorColumn extends Annotation {
|
final class DiscriminatorColumn implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -72,7 +72,7 @@ final class DiscriminatorColumn extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class DiscriminatorMap extends Annotation {
|
final class DiscriminatorMap implements Annotation {
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -81,13 +81,13 @@ final class DiscriminatorMap extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class Id extends Annotation {}
|
final class Id implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class GeneratedValue extends Annotation {
|
final class GeneratedValue implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $strategy = 'AUTO';
|
public $strategy = 'AUTO';
|
||||||
}
|
}
|
||||||
@ -96,13 +96,13 @@ final class GeneratedValue extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class Version extends Annotation {}
|
final class Version implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY","ANNOTATION"})
|
* @Target({"PROPERTY","ANNOTATION"})
|
||||||
*/
|
*/
|
||||||
final class JoinColumn extends Annotation {
|
final class JoinColumn implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -123,7 +123,7 @@ final class JoinColumn extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class JoinColumns extends Annotation {
|
final class JoinColumns implements Annotation {
|
||||||
/** @var array<Doctrine\ORM\Mapping\JoinColumn> */
|
/** @var array<Doctrine\ORM\Mapping\JoinColumn> */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ final class JoinColumns extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class Column extends Annotation {
|
final class Column implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var mixed */
|
/** @var mixed */
|
||||||
@ -157,7 +157,7 @@ final class Column extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class OneToOne extends Annotation {
|
final class OneToOne implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $targetEntity;
|
public $targetEntity;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -176,7 +176,7 @@ final class OneToOne extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class OneToMany extends Annotation {
|
final class OneToMany implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $mappedBy;
|
public $mappedBy;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -195,7 +195,7 @@ final class OneToMany extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class ManyToOne extends Annotation {
|
final class ManyToOne implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $targetEntity;
|
public $targetEntity;
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
@ -210,7 +210,7 @@ final class ManyToOne extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class ManyToMany extends Annotation {
|
final class ManyToMany implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $targetEntity;
|
public $targetEntity;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -230,7 +230,7 @@ final class ManyToMany extends Annotation {
|
|||||||
* @Target("ALL")
|
* @Target("ALL")
|
||||||
* @todo check available targets
|
* @todo check available targets
|
||||||
*/
|
*/
|
||||||
final class ElementCollection extends Annotation {
|
final class ElementCollection implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $tableName;
|
public $tableName;
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ final class ElementCollection extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class Table extends Annotation {
|
final class Table implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -254,7 +254,7 @@ final class Table extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("ANNOTATION")
|
* @Target("ANNOTATION")
|
||||||
*/
|
*/
|
||||||
final class UniqueConstraint extends Annotation {
|
final class UniqueConstraint implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
@ -265,7 +265,7 @@ final class UniqueConstraint extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("ANNOTATION")
|
* @Target("ANNOTATION")
|
||||||
*/
|
*/
|
||||||
final class Index extends Annotation {
|
final class Index implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
@ -276,7 +276,7 @@ final class Index extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class JoinTable extends Annotation {
|
final class JoinTable implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -291,7 +291,7 @@ final class JoinTable extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class SequenceGenerator extends Annotation {
|
final class SequenceGenerator implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $sequenceName;
|
public $sequenceName;
|
||||||
/** @var integer */
|
/** @var integer */
|
||||||
@ -304,7 +304,7 @@ final class SequenceGenerator extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class ChangeTrackingPolicy extends Annotation {
|
final class ChangeTrackingPolicy implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -313,7 +313,7 @@ final class ChangeTrackingPolicy extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("PROPERTY")
|
* @Target("PROPERTY")
|
||||||
*/
|
*/
|
||||||
final class OrderBy extends Annotation {
|
final class OrderBy implements Annotation {
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ final class OrderBy extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class NamedQueries extends Annotation {
|
final class NamedQueries implements Annotation {
|
||||||
/** @var array<Doctrine\ORM\Mapping\NamedQuery> */
|
/** @var array<Doctrine\ORM\Mapping\NamedQuery> */
|
||||||
public $value;
|
public $value;
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ final class NamedQueries extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("ANNOTATION")
|
* @Target("ANNOTATION")
|
||||||
*/
|
*/
|
||||||
final class NamedQuery extends Annotation {
|
final class NamedQuery implements Annotation {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $name;
|
public $name;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -344,46 +344,46 @@ final class NamedQuery extends Annotation {
|
|||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("CLASS")
|
* @Target("CLASS")
|
||||||
*/
|
*/
|
||||||
final class HasLifecycleCallbacks extends Annotation {}
|
final class HasLifecycleCallbacks implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PrePersist extends Annotation {}
|
final class PrePersist implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PostPersist extends Annotation {}
|
final class PostPersist implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PreUpdate extends Annotation {}
|
final class PreUpdate implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PostUpdate extends Annotation {}
|
final class PostUpdate implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PreRemove extends Annotation {}
|
final class PreRemove implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PostRemove extends Annotation {}
|
final class PostRemove implements Annotation {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target("METHOD")
|
* @Target("METHOD")
|
||||||
*/
|
*/
|
||||||
final class PostLoad extends Annotation {}
|
final class PostLoad implements Annotation {}
|
||||||
|
@ -206,6 +206,7 @@ final class Query extends AbstractQuery
|
|||||||
if ($this->_useQueryCache && ($queryCache = $this->getQueryCacheDriver())) {
|
if ($this->_useQueryCache && ($queryCache = $this->getQueryCacheDriver())) {
|
||||||
$hash = $this->_getQueryCacheId();
|
$hash = $this->_getQueryCacheId();
|
||||||
$cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash);
|
$cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash);
|
||||||
|
|
||||||
if ($cached === false) {
|
if ($cached === false) {
|
||||||
// Cache miss.
|
// Cache miss.
|
||||||
$parser = new Parser($this);
|
$parser = new Parser($this);
|
||||||
@ -219,6 +220,7 @@ final class Query extends AbstractQuery
|
|||||||
$parser = new Parser($this);
|
$parser = new Parser($this);
|
||||||
$this->_parserResult = $parser->parse();
|
$this->_parserResult = $parser->parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_state = self::STATE_CLEAN;
|
$this->_state = self::STATE_CLEAN;
|
||||||
|
|
||||||
return $this->_parserResult;
|
return $this->_parserResult;
|
||||||
|
@ -100,14 +100,11 @@ class QueryCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
|
|
||||||
public function testQueryCache_NoHitSaveParserResult()
|
public function testQueryCache_NoHitSaveParserResult()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped("Needs to be migrated to common 2.2");
|
|
||||||
|
|
||||||
$this->_em->getConfiguration()->setQueryCacheImpl(new ArrayCache());
|
$this->_em->getConfiguration()->setQueryCacheImpl(new ArrayCache());
|
||||||
|
|
||||||
$query = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux');
|
$query = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux');
|
||||||
|
|
||||||
$cache = $this->getMock('Doctrine\Common\Cache\CacheProvider',
|
$cache = $this->getMock('Doctrine\Common\Cache\ArrayCache', array('doFetch', 'doSave'));
|
||||||
array('doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush'));
|
|
||||||
$cache->expects($this->at(0))
|
$cache->expects($this->at(0))
|
||||||
->method('doFetch')
|
->method('doFetch')
|
||||||
->with($this->isType('string'))
|
->with($this->isType('string'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user