Skip to content

Commit 16a8122

Browse files
committed
[DoctrineBridge] Fix required guess of boolean fields
1 parent 87f83f7 commit 16a8122

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function guessRequired($class, $property)
9595

9696
// Check whether the field exists and is nullable or not
9797
if ($classMetadata->hasField($property)) {
98-
if (!$classMetadata->isNullable($property)) {
98+
if (!$classMetadata->isNullable($property) && $classMetadata->getTypeOfField($property) !== 'boolean') {
9999
return new ValueGuess(true, Guess::HIGH_CONFIDENCE);
100100
}
101101

0 commit comments

Comments
 (0)