We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 446ead7 commit 0aa7f41Copy full SHA for 0aa7f41
src/Reflection/ClassReflection.php
@@ -346,6 +346,10 @@ private function collectTraits(ReflectionClass|ReflectionEnum $class): array
346
347
public function allowsDynamicProperties(): bool
348
{
349
+ if ($this->isEnum()) {
350
+ return false;
351
+ }
352
+
353
if (!$this->phpVersion->deprecatesDynamicProperties()) {
354
return true;
355
}
0 commit comments