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 6565 symfony/validator=${{ matrix.symfony-version }}
6666 symfony/yaml=${{ matrix.symfony-version }}
6767
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+
6876 - name : Install Composer dependencies
6977 if : matrix.composer-flags == ''
7078 run : composer install
Original file line number Diff line number Diff line change 1616 ],
1717 "require" : {
1818 "php" : " ^7.2 || ^8.0" ,
19- "doctrine/annotations" : " ^1.3" ,
19+ "doctrine/annotations" : " ^1.3 || ^2.0 " ,
2020 "phpunit/phpunit" : " ^7.5.0 || ^8.0 || ^9.0" ,
2121 "symfony/browser-kit" : " ^4.4 || ^5.1 || ^6.0" ,
2222 "symfony/framework-bundle" : " ^4.4 || ^5.1 || ^6.0"
Original file line number Diff line number Diff line change 1515
1616$ loader = require __DIR__ .'/../../vendor/autoload.php ' ;
1717
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+ }
1923
2024return $ loader ;
You can’t perform that action at this time.
0 commit comments