From f22baecc88f6a011212e512046e211403a752469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Dvo=C5=99=C3=A1k?= Date: Wed, 20 Apr 2022 16:53:36 +0200 Subject: [PATCH 1/2] Add doctrine/annotations to composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5a6612b..4ea2aea 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,8 @@ "php": ">=7.1.0", "doctrine/common": "^2.3|^3.0", "jms/metadata": "^1.1|^2.0", - "symfony/cache": "^5.0|^6.0" + "symfony/cache": "^5.0|^6.0", + "doctrine/annotations": "^1.13" }, "require-dev": { "doctrine/orm": "^2.3", From 16b100b9903813aedcb6537b9ad4f4547b5d5e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Dvo=C5=99=C3=A1k?= Date: Wed, 20 Apr 2022 17:01:09 +0200 Subject: [PATCH 2/2] Use AnnotationDriver from doctrine\orm In doctrinne/orm 2.12.0 AnnotationDriver no longer extend abstract AnnotationDriver class defined in doctrine/persistence --- composer.json | 2 +- src/Mapping/Driver/DoctrineAdapter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4ea2aea..28c8919 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,12 @@ "require": { "php": ">=7.1.0", "doctrine/common": "^2.3|^3.0", + "doctrine/orm": ">=2.12.0", "jms/metadata": "^1.1|^2.0", "symfony/cache": "^5.0|^6.0", "doctrine/annotations": "^1.13" }, "require-dev": { - "doctrine/orm": "^2.3", "symfony/yaml": "^5.0|6.0", "phpunit/phpunit": "^8.5" }, diff --git a/src/Mapping/Driver/DoctrineAdapter.php b/src/Mapping/Driver/DoctrineAdapter.php index e7f18ee..399962e 100644 --- a/src/Mapping/Driver/DoctrineAdapter.php +++ b/src/Mapping/Driver/DoctrineAdapter.php @@ -12,7 +12,7 @@ use Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver; use Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver; use Doctrine\Persistence\ManagerRegistry; -use Doctrine\Persistence\Mapping\Driver\AnnotationDriver as DoctrineAnnotationDriver; +use Doctrine\ORM\Mapping\Driver\AnnotationDriver as DoctrineAnnotationDriver; use Doctrine\Persistence\Mapping\Driver\FileDriver as DoctrineFileDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;