Skip to content

Commit

Permalink
[DoctrineBridge] normalized class names in the ORM type guesser
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 29, 2013
1 parent 9ec6a9c commit a1b9c2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Expand Up @@ -19,6 +19,7 @@
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
{
Expand Down Expand Up @@ -161,6 +162,9 @@ public function guessPattern($class, $property)

protected function getMetadata($class)
{
// normalize class name
$class = ClassUtils::getRealClass(ltrim($class, '\\'));

if (array_key_exists($class, $this->cache)) {
return $this->cache[$class];
}
Expand Down

0 comments on commit a1b9c2e

Please sign in to comment.