17
17
use Doctrine \Persistence \ManagerRegistry ;
18
18
use Doctrine \Persistence \Mapping \MappingException ;
19
19
use Doctrine \Persistence \Proxy ;
20
+ use Symfony \Bridge \Doctrine \Form \Type \EntityType ;
20
21
use Symfony \Component \Form \Extension \Core \Type \CheckboxType ;
21
22
use Symfony \Component \Form \Extension \Core \Type \CollectionType ;
22
23
use Symfony \Component \Form \Extension \Core \Type \DateIntervalType ;
@@ -49,7 +50,7 @@ public function __construct(ManagerRegistry $registry)
49
50
public function guessType (string $ class , string $ property ): ?TypeGuess
50
51
{
51
52
if (!$ ret = $ this ->getMetadata ($ class )) {
52
- return new TypeGuess (' Symfony\Component\Form\Extension\Core\Type\ TextType' , [], Guess::LOW_CONFIDENCE );
53
+ return new TypeGuess (TextType::class , [], Guess::LOW_CONFIDENCE );
53
54
}
54
55
55
56
[$ metadata , $ name ] = $ ret ;
@@ -58,7 +59,7 @@ public function guessType(string $class, string $property): ?TypeGuess
58
59
$ multiple = $ metadata ->isCollectionValuedAssociation ($ property );
59
60
$ mapping = $ metadata ->getAssociationMapping ($ property );
60
61
61
- return new TypeGuess (' Symfony\Bridge\Doctrine\Form\Type\ EntityType' , ['em ' => $ name , 'class ' => $ mapping ['targetEntity ' ], 'multiple ' => $ multiple ], Guess::HIGH_CONFIDENCE );
62
+ return new TypeGuess (EntityType::class , ['em ' => $ name , 'class ' => $ mapping ['targetEntity ' ], 'multiple ' => $ multiple ], Guess::HIGH_CONFIDENCE );
62
63
}
63
64
64
65
return match ($ metadata ->getTypeOfField ($ property )) {
0 commit comments