File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22
22
use Doctrine \ORM \EntityManagerInterface ;
23
23
use Doctrine \ORM \Mapping \ClassMetadata ;
24
24
use Doctrine \ORM \Mapping \ClassMetadataInfo ;
25
+ use ReflectionEnum ;
25
26
use ReflectionNamedType ;
26
27
27
28
use function array_diff ;
36
37
use function class_parents ;
37
38
use function count ;
38
39
use function get_class ;
39
- use function get_debug_type ;
40
40
use function implode ;
41
41
use function in_array ;
42
42
use function is_a ;
@@ -391,7 +391,7 @@ function (array $fieldMapping) use ($class): ?string {
391
391
392
392
if (
393
393
is_a ($ propertyType , BackedEnum::class, true )
394
- && $ metadataFieldType === get_debug_type ( $ propertyType:: cases ()[ 0 ]-> value )
394
+ && $ metadataFieldType === ( string ) ( new ReflectionEnum ( $ propertyType))-> getBackingType ( )
395
395
) {
396
396
if (! isset ($ fieldMapping ['enumType ' ]) || $ propertyType === $ fieldMapping ['enumType ' ]) {
397
397
return null ;
You can’t perform that action at this time.
0 commit comments