Fixing bug where PropertyInfoLoader tried to add validation to non-existent properties
This commit is contained in:
parent
4f714a63bb
commit
b702598b0b
@ -60,6 +60,10 @@ final class PropertyInfoLoader implements LoaderInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!property_exists($className, $property)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$types = $this->typeExtractor->getTypes($className, $property);
|
||||
if (null === $types) {
|
||||
continue;
|
||||
|
@ -48,4 +48,8 @@ class PropertyInfoLoaderEntity
|
||||
public $alreadyPartiallyMappedCollection;
|
||||
|
||||
public $readOnly;
|
||||
|
||||
public function setNonExistentField()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ class PropertyInfoLoaderTest extends TestCase
|
||||
'alreadyMappedNotBlank',
|
||||
'alreadyPartiallyMappedCollection',
|
||||
'readOnly',
|
||||
'nonExistentField',
|
||||
])
|
||||
;
|
||||
$propertyInfoStub
|
||||
|
Reference in New Issue
Block a user