updated-packages
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
namespace DeepCopy\Matcher\Doctrine;
|
||||
|
||||
use DeepCopy\Matcher\Matcher;
|
||||
use Doctrine\Common\Persistence\Proxy;
|
||||
use Doctrine\Persistence\Proxy;
|
||||
|
||||
/**
|
||||
* @final
|
||||
|
||||
@@ -41,6 +41,12 @@ class PropertyTypeMatcher implements Matcher
|
||||
|
||||
$reflectionProperty->setAccessible(true);
|
||||
|
||||
// Uninitialized properties (for PHP >7.4)
|
||||
if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) {
|
||||
// null instanceof $this->propertyType
|
||||
return false;
|
||||
}
|
||||
|
||||
return $reflectionProperty->getValue($object) instanceof $this->propertyType;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user