@@ -485,10 +485,7 @@ public function hasProperty(string $propertyName): bool
485485
486486 // For BC purpose
487487 if ($ this ->getPhpExtension ()->hasProperty ($ this , $ propertyName )) {
488- $ property = $ this ->getPhpExtension ()->getProperty ($ this , $ propertyName );
489- if ($ property ->isStatic ()) {
490- return $ this ->hasPropertyCache [$ propertyName ] = true ;
491- }
488+ return $ this ->hasPropertyCache [$ propertyName ] = true ;
492489 }
493490
494491 if ($ this ->requireExtendsPropertiesClassReflectionExtension ->hasProperty ($ this , $ propertyName )) {
@@ -513,6 +510,10 @@ public function hasInstanceProperty(string $propertyName): bool
513510 break ;
514511 }
515512 if ($ extension ->hasProperty ($ this , $ propertyName )) {
513+ $ property = $ extension ->getProperty ($ this , $ propertyName );
514+ if ($ property ->isStatic ()) {
515+ continue ;
516+ }
516517 return $ this ->hasInstancePropertyCache [$ propertyName ] = true ;
517518 }
518519 }
@@ -744,13 +745,9 @@ public function getProperty(string $propertyName, ClassMemberAccessAnswerer $sco
744745
745746 // For BC purpose
746747 if ($ this ->getPhpExtension ()->hasProperty ($ this , $ propertyName )) {
747- $ property = $ this ->wrapExtendedProperty ($ propertyName , $ this ->getPhpExtension ()->getProperty ($ this , $ propertyName ));
748- if ($ property ->isStatic ()) {
749- if ($ scope ->canReadProperty ($ property )) {
750- return $ this ->properties [$ key ] = $ property ;
751- }
752- $ this ->properties [$ key ] = $ property ;
753- }
748+ $ property = $ this ->getPhpExtension ()->getProperty ($ this , $ propertyName );
749+
750+ return $ this ->properties [$ key ] = $ property ;
754751 }
755752
756753 if (!isset ($ this ->properties [$ key ])) {
0 commit comments