File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 65
65
symfony/validator=${{ matrix.symfony-version }}
66
66
symfony/yaml=${{ matrix.symfony-version }}
67
67
68
+ - name : Require Annotations v1 to require for PHP 7
69
+ if : startsWith(matrix.php-version, '7.')
70
+ run : composer require --no-update "doctrine/annotations:^1.8.0"
71
+
72
+ - name : Require Annotations v1/v2 to require for PHP 8+
73
+ if : startsWith(matrix.php-version, '7.') != true
74
+ run : composer require --no-update "doctrine/annotations:^1.8.0|^2.0"
75
+
68
76
- name : Install Composer dependencies
69
77
if : matrix.composer-flags == ''
70
78
run : composer install
Original file line number Diff line number Diff line change 16
16
],
17
17
"require" : {
18
18
"php" : " ^7.2 || ^8.0" ,
19
- "doctrine/annotations" : " ^1.3" ,
19
+ "doctrine/annotations" : " ^1.3 || ^2.0 " ,
20
20
"phpunit/phpunit" : " ^7.5.0 || ^8.0 || ^9.0" ,
21
21
"symfony/browser-kit" : " ^4.4 || ^5.1 || ^6.0" ,
22
22
"symfony/framework-bundle" : " ^4.4 || ^5.1 || ^6.0"
Original file line number Diff line number Diff line change 15
15
16
16
$ loader = require __DIR__ .'/../../vendor/autoload.php ' ;
17
17
18
- AnnotationRegistry::registerLoader ([$ loader , 'loadClass ' ]);
18
+ // This method only exist on doctrine/annotations:^1.3,
19
+ // it is missing but not needed with doctrine/annotations:^2.0
20
+ if (method_exists (AnnotationRegistry::class, 'registerLoader ' )) {
21
+ AnnotationRegistry::registerLoader ([$ loader , 'loadClass ' ]);
22
+ }
19
23
20
24
return $ loader ;
You can’t perform that action at this time.
0 commit comments