8000 added test case for typed properties without default value, issue #32465 · symfony/symfony@5d528cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d528cf

Browse files
committed
added test case for typed properties without default value, issue #32465
1 parent 5e98b8f commit 5d528cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ public function provideHashedSignature()
134134
yield [1, 13, 'protected function prot($a = [123]) {}'];
135135
yield [0, 14, '/** priv docblock */'];
136136
yield [0, 15, ''];
137+
138+
if (PHP_VERSION_ID >= 70400) {
139+
// PHP7.4 typed properties without default value are
140+
// undefined, make sure this doesn't throw an error
141+
yield [1, 5, 'public array $pub;'];
142+
yield [0, 7, 'protected int $prot;'];
143+
yield [0, 9, 'private string $priv;'];
144+
}
137145
}
138146

139147
public function testEventSubscriber()

0 commit comments

Comments
 (0)
0