Skip to content

Commit 404326a

Browse files
committed
Disallow applying both @strict-properties and #[\AllowDynamicProperties]
1 parent a731847 commit 404326a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/gen_stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,6 +3305,10 @@ function parseClass(
33053305
}
33063306
}
33073307

3308+
if ($isStrictProperties && $allowsDynamicProperties) {
3309+
throw new Exception("A class may not have '@strict-properties' and '#[\\AllowDynamicProperties]' at the same time.");
3310+
}
3311+
33083312
$extends = [];
33093313
$implements = [];
33103314

0 commit comments

Comments
 (0)