We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41837b4 commit 06d592dCopy full SHA for 06d592d
src/Analyser/NodeScopeResolver.php
@@ -2993,7 +2993,7 @@ static function (): void {
2993
$propertyName = $expr->name->toString();
2994
$propertyHolderType = $scopeBeforeVar->getType($expr->var);
2995
$propertyReflection = $scopeBeforeVar->getPropertyReflection($propertyHolderType, $propertyName);
2996
- if ($propertyReflection !== null) {
+ if ($propertyReflection !== null && $this->phpVersion->supportsPropertyHooks()) {
2997
$propertyDeclaringClass = $propertyReflection->getDeclaringClass();
2998
if ($propertyDeclaringClass->hasNativeProperty($propertyName)) {
2999
$nativeProperty = $propertyDeclaringClass->getNativeProperty($propertyName);
0 commit comments