Skip to content

Commit 42072bd

Browse files
mbabkerfranmomu
authored andcommitted
Allow doctrine/annotations 2.0
1 parent 2bf3ad5 commit 42072bd

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ jobs:
6969
if: "${{ matrix.mongodb-odm-version }}"
7070
run: "composer require --dev --no-update doctrine/mongodb-odm:${{ matrix.mongodb-odm-version }}"
7171

72+
# Remove PHP-CS-Fixer to avoid conflicting dependency ranges (i.e. doctrine/annotations)
73+
- name: "Remove PHP-CS-Fixer"
74+
run: "composer remove --dev --no-update friendsofphp/php-cs-fixer"
75+
7276
- name: "Install dependencies with Composer"
7377
uses: "ramsey/composer-install@v2"
7478
with:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"require": {
4141
"php": "^7.2 || ^8.0",
4242
"behat/transliterator": "~1.2",
43-
"doctrine/annotations": "^1.13",
43+
"doctrine/annotations": "^1.13 || ^2.0",
4444
"doctrine/collections": "^1.2 || ^2.0",
4545
"doctrine/common": "^2.13 || ^3.0",
4646
"doctrine/event-manager": "^1.2 || ^2.0",

tests/Gedmo/Mapping/SluggableMappingTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Gedmo\Tests\Mapping;
1313

1414
use Doctrine\Common\Annotations\AnnotationReader;
15-
use Doctrine\Common\Annotations\AnnotationRegistry;
1615
use Doctrine\Common\EventManager;
1716
use Doctrine\ORM\Mapping\Driver\YamlDriver;
1817
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
@@ -49,10 +48,6 @@ protected function setUp(): void
4948
'Gedmo\Tests\Mapping\Fixture\Yaml'
5049
);
5150
$reader = new AnnotationReader();
52-
AnnotationRegistry::registerAutoloadNamespace(
53-
'Gedmo\\Mapping\\Annotation',
54-
dirname(VENDOR_PATH).'/src'
55-
);
5651
$chainDriverImpl->addDriver(
5752
new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader),
5853
'Gedmo\Tests\Mapping\Fixture'

tests/bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
define('TESTS_PATH', __DIR__);
2626
define('TESTS_TEMP_DIR', sys_get_temp_dir().'/doctrine-extension-tests');
27-
define('VENDOR_PATH', realpath(dirname(__DIR__).'/vendor'));
2827

2928
require dirname(__DIR__).'/vendor/autoload.php';
3029

0 commit comments

Comments
 (0)