Skip to content

Commit 47e2a9a

Browse files
mad-brillerondrejmirtes
authored andcommitted
Revert calling allowsDynamicPropertiesExtensions ahead of time.
1 parent 88e5898 commit 47e2a9a

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎src/Reflection/ClassReflection.php‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,9 @@ public function hasProperty(string $propertyName): bool
385385
if ($this->isEnum()) {
386386
return $this->hasNativeProperty($propertyName);
387387
}
388-
$allowsDynamicPropertiesExtensions = $this->allowsDynamicPropertiesExtensions();
389388

390389
foreach ($this->propertiesClassReflectionExtensions as $i => $extension) {
391-
if ($i > 0 && !$allowsDynamicPropertiesExtensions) {
390+
if ($i > 0 && !$this->allowsDynamicPropertiesExtensions()) {
392391
break;
393392
}
394393
if ($extension->hasProperty($this, $propertyName)) {
@@ -539,10 +538,8 @@ public function getProperty(string $propertyName, ClassMemberAccessAnswerer $sco
539538
$key = sprintf('%s-%s', $key, $scope->getClassReflection()->getCacheKey());
540539
}
541540
if (!isset($this->properties[$key])) {
542-
$allowsDynamicPropertiesExtensions = $this->allowsDynamicPropertiesExtensions();
543-
544541
foreach ($this->propertiesClassReflectionExtensions as $i => $extension) {
545-
if ($i > 0 && !$allowsDynamicPropertiesExtensions) {
542+
if ($i > 0 && !$this->allowsDynamicPropertiesExtensions()) {
546543
break;
547544
}
548545
if (!$extension->hasProperty($this, $propertyName)) {

0 commit comments

Comments
 (0)