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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!property_exists($className, $property)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$types = $this->typeExtractor->getTypes($className, $property);
|
$types = $this->typeExtractor->getTypes($className, $property);
|
||||||
if (null === $types) {
|
if (null === $types) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -48,4 +48,8 @@ class PropertyInfoLoaderEntity
|
|||||||
public $alreadyPartiallyMappedCollection;
|
public $alreadyPartiallyMappedCollection;
|
||||||
|
|
||||||
public $readOnly;
|
public $readOnly;
|
||||||
|
|
||||||
|
public function setNonExistentField()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ class PropertyInfoLoaderTest extends TestCase
|
|||||||
'alreadyMappedNotBlank',
|
'alreadyMappedNotBlank',
|
||||||
'alreadyPartiallyMappedCollection',
|
'alreadyPartiallyMappedCollection',
|
||||||
'readOnly',
|
'readOnly',
|
||||||
|
'nonExistentField',
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
$propertyInfoStub
|
$propertyInfoStub
|
||||||
|
Reference in New Issue
Block a user