Skip to content

Commit 39bae03

Browse files
authored
Merge pull request #327 from W0rma/annotations-2
Allow doctrine/annotations:2
2 parents 9a1830d + 57be209 commit 39bae03

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
],
1919
"require": {
2020
"php": "^7.2 | ^8.0",
21-
"doctrine/annotations": "^1.13.2",
21+
"doctrine/annotations": "^1.13.2 || ^2.0",
2222
"jms/metadata": "^2.0",
2323
"jms/serializer": "^3.18.2",
2424
"symfony/expression-language": "~3.0 || ~4.0 || ~5.0 || ~6.0"
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^7 | ^9.5.10",
2828
"doctrine/coding-standard": "^5.0 | ^8.0",
29-
"doctrine/persistence": "^1.3.4",
29+
"doctrine/persistence": "^1.3.4 | ^2.0 | ^3.0",
3030
"pagerfanta/core": "^2.4 || ^3.0",
3131
"phpdocumentor/type-resolver": "^1.5.1",
3232
"phpspec/prophecy-phpunit": "^2.0.1",

tests/bootstrap.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818

1919
$loader->add('Hateoas\Tests', __DIR__);
2020

21-
AnnotationRegistry::registerLoader('class_exists');
21+
// Method has been removed in doctrine/annotations:2
22+
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
23+
AnnotationRegistry::registerLoader('class_exists');
24+
}

0 commit comments

Comments
 (0)