Skip to content

Commit

Permalink
Try using EnumReflectionProperty
Browse files Browse the repository at this point in the history
I thought the test suite would be green, but for some reasons I don't
understand yet, it isn't.
  • Loading branch information
greg0ire committed Mar 1, 2024
1 parent 53763d4 commit 4b22ea0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"doctrine/inflector": "^1.4 || ^2.0",
"doctrine/instantiator": "^1.3 || ^2",
"doctrine/lexer": "^3",
"doctrine/persistence": "^3.1.1",
"doctrine/persistence": "^3.3.0",
"psr/cache": "^1 || ^2 || ^3",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/var-exporter": "~6.2.13 || ^6.3.2 || ^7.0"
Expand Down
5 changes: 3 additions & 2 deletions src/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Doctrine\ORM\Id\AbstractIdGenerator;
use Doctrine\Persistence\Mapping\ClassMetadata as PersistenceClassMetadata;
use Doctrine\Persistence\Mapping\ReflectionService;
use Doctrine\Persistence\Reflection\EnumReflectionProperty;
use InvalidArgumentException;
use LogicException;
use ReflectionClass;
Expand Down Expand Up @@ -822,7 +823,7 @@ public function wakeupReflection(ReflectionService $reflService): void
assert($childProperty !== null);

if (isset($mapping->enumType)) {
$childProperty = new ReflectionEnumProperty(
$childProperty = new EnumReflectionProperty(
$childProperty,
$mapping->enumType,
);
Expand All @@ -841,7 +842,7 @@ public function wakeupReflection(ReflectionService $reflService): void
: $this->getAccessibleProperty($reflService, $this->name, $field);

if (isset($mapping->enumType) && $this->reflFields[$field] !== null) {
$this->reflFields[$field] = new ReflectionEnumProperty(
$this->reflFields[$field] = new EnumReflectionProperty(
$this->reflFields[$field],
$mapping->enumType,
);
Expand Down

0 comments on commit 4b22ea0

Please sign in to comment.