Skip to content

Commit

Permalink
Restore support for doctrine/orm v2
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed May 25, 2024
1 parent a2b0fb7 commit 621c173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.5",
"doctrine/orm": "^3.0",
"doctrine/orm": "^2.5 || ^3.0",
"doctrine/persistence": "^1.3 || ^2.0 || ^3.0",
"ergebnis/composer-normalize": "^2.0.1",
"symfony/browser-kit": "^6.4 || ^7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Type/DoctrineDiscriminatorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Nucleos\Form\Type;

use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader;
Expand Down Expand Up @@ -64,7 +64,7 @@ private function getChoices(string $class): array

$meta = $manager->getClassMetadata($class);

\assert($meta instanceof ClassMetadataInfo);
\assert($meta instanceof ClassMetadata);

foreach ($meta->discriminatorMap as $key => $value) {
$choices[$key] = $key;
Expand Down

0 comments on commit 621c173

Please sign in to comment.