Add forward compatibility with Doctrine Common 3.0
This commit is contained in:
parent
a0d79b03e7
commit
3adbf0de39
1 changed files with 4 additions and 1 deletions
|
@ -121,7 +121,10 @@ class Configuration extends \Doctrine\DBAL\Configuration
|
|||
*/
|
||||
public function newDefaultAnnotationDriver($paths = array())
|
||||
{
|
||||
if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-BETA3-DEV', '>=')) {
|
||||
if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
|
||||
$reader = new \Doctrine\Common\Annotations\AnnotationReader();
|
||||
$reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());
|
||||
} else if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-BETA3-DEV', '>=')) {
|
||||
$reader = new \Doctrine\Common\Annotations\AnnotationReader();
|
||||
$reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
|
||||
$reader->setIgnoreNotImportedAnnotations(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue