Skip to content

Commit 91dd0e8

Browse files
authored
Merge pull request #210 from Slamdunk/annotations_2
Add support for doctrine/annotations v2
2 parents f50b1aa + 076daf9 commit 91dd0e8

File tree

3 files changed

+37
-91
lines changed

3 files changed

+37
-91
lines changed

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"require-dev": {
2525
"ext-intl": "*",
26-
"doctrine/annotations": "^1.14.3",
26+
"doctrine/annotations": "^1.14.3 || ^2.0.1",
2727
"laminas/laminas-captcha": "^2.16",
2828
"laminas/laminas-coding-standard": "^2.5",
2929
"laminas/laminas-db": "^2.17",
@@ -43,7 +43,7 @@
4343
"vimeo/psalm": "^5.8"
4444
},
4545
"conflict": {
46-
"doctrine/annotations": "<1.12.0",
46+
"doctrine/annotations": "<1.14.0",
4747
"laminas/laminas-captcha": "<2.16.0",
4848
"laminas/laminas-eventmanager": "<3.10.0",
4949
"laminas/laminas-i18n": "<2.21.0",

Diff for: composer.lock

+35-79
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/Annotation/AnnotationBuilder.php

-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use ArrayObject;
88
use Doctrine\Common\Annotations\AnnotationReader;
9-
use Doctrine\Common\Annotations\AnnotationRegistry;
109
use ReflectionClass;
1110
use ReflectionException;
1211

@@ -16,15 +15,6 @@
1615
*/
1716
final class AnnotationBuilder extends AbstractBuilder
1817
{
19-
/**
20-
* Initialize the annotation registry
21-
*/
22-
public function __construct()
23-
{
24-
// doctrine/annotations 1.x does not require autoloading by default
25-
AnnotationRegistry::registerLoader('class_exists');
26-
}
27-
2818
/**
2919
* Derive a form specification from doctrine annotations for a given entity
3020
*

0 commit comments

Comments
 (0)