[DoctrineBridge] normalized class names in the ORM type guesser
This commit is contained in:
parent
9ec6a9c3dc
commit
a1b9c2ed60
@ -19,6 +19,7 @@ use Symfony\Component\Form\FormTypeGuesserInterface;
|
||||
use Symfony\Component\Form\Guess\Guess;
|
||||
use Symfony\Component\Form\Guess\TypeGuess;
|
||||
use Symfony\Component\Form\Guess\ValueGuess;
|
||||
use Doctrine\Common\Util\ClassUtils;
|
||||
|
||||
class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
|
||||
{
|
||||
@ -161,6 +162,9 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
|
||||
|
||||
protected function getMetadata($class)
|
||||
{
|
||||
// normalize class name
|
||||
$class = ClassUtils::getRealClass(ltrim($class, '\\'));
|
||||
|
||||
if (array_key_exists($class, $this->cache)) {
|
||||
return $this->cache[$class];
|
||||
}
|
||||
|
Reference in New Issue
Block a user