Skip to content

Commit

Permalink
Fixed broken annotation registration since doctrine/orm 2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Dec 21, 2022
1 parent 1de4929 commit 929fe15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Provider/Doctrine/Persistence/Helper/DoctrineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace DH\Auditor\Provider\Doctrine\Persistence\Helper;

use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Result;
Expand Down Expand Up @@ -147,7 +148,7 @@ public static function createAttributeMetadataConfiguration(array $paths, bool $
public static function createAnnotationMetadataConfiguration(array $paths, bool $isDevMode = false): Configuration
{
if (class_exists(ORMSetup::class)) {
require_once self::getVendorDir().'/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php';
AnnotationRegistry::registerLoader('class_exists');

return ORMSetup::createAnnotationMetadataConfiguration($paths, $isDevMode);
}
Expand Down

0 comments on commit 929fe15

Please sign in to comment.