Skip to content

Commit a25b82d

Browse files
committed
Check AnnotationsPropertiesClassReflectionExtension in PhpClassReflectionExtension only when class allows dynamic properties or the original native property is not private
1 parent 8f7e973 commit a25b82d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Reflection/Php/PhpClassReflectionExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ private function createProperty(
399399
if (
400400
$includingAnnotations
401401
&& !$declaringClassReflection->isEnum()
402+
&& ($classReflection->allowsDynamicProperties() || !$propertyReflection->isPrivate())
402403
&& $this->annotationsPropertiesClassReflectionExtension->hasProperty($classReflection, $propertyName)
403404
) {
404405
$hierarchyDistances = $classReflection->getClassHierarchyDistances();

0 commit comments

Comments
 (0)