Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1b9c2e

Browse filesBrowse files
committed
[DoctrineBridge] normalized class names in the ORM type guesser
1 parent 9ec6a9c commit a1b9c2e
Copy full SHA for a1b9c2e

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Form\Guess\Guess;
2020
use Symfony\Component\Form\Guess\TypeGuess;
2121
use Symfony\Component\Form\Guess\ValueGuess;
22+
use Doctrine\Common\Util\ClassUtils;
2223

2324
class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
2425
{
@@ -161,6 +162,9 @@ public function guessPattern($class, $property)
161162

162163
protected function getMetadata($class)
163164
{
165+
// normalize class name
166+
$class = ClassUtils::getRealClass(ltrim($class, '\\'));
167+
164168
if (array_key_exists($class, $this->cache)) {
165169
return $this->cache[$class];
166170
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.