Skip to content

Commit 68fa55f

Browse files
authored
Remove fallbacks for old doctrine/annotations version (#9235)
1 parent 92434f9 commit 68fa55f

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

tests/Doctrine/Tests/OrmTestCase.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,12 @@ abstract class OrmTestCase extends DoctrineTestCase
5858
/** @var Cache|null */
5959
protected $secondLevelCacheDriverImpl = null;
6060

61-
/**
62-
* @param mixed $alias
63-
*/
64-
protected function createAnnotationDriver(array $paths = [], $alias = null): AnnotationDriver
61+
protected function createAnnotationDriver(array $paths = []): AnnotationDriver
6562
{
66-
// Register the ORM Annotations in the AnnotationRegistry
67-
$reader = new Annotations\AnnotationReader();
68-
69-
if (class_exists(Annotations\PsrCachedReader::class)) {
70-
$reader = new Annotations\PsrCachedReader($reader, new ArrayAdapter());
71-
} else {
72-
$reader = new Annotations\CachedReader($reader, DoctrineProvider::wrap(new ArrayAdapter()));
73-
}
74-
75-
Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
76-
77-
return new AnnotationDriver($reader, (array) $paths);
63+
return new AnnotationDriver(
64+
new Annotations\PsrCachedReader(new Annotations\AnnotationReader(), new ArrayAdapter()),
65+
$paths
66+
);
7867
}
7968

8069
/**

0 commit comments

Comments
 (0)