Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3906cb

Browse files
committed
Add test data to validate scenario failure
This makes the tests running in PHP 8.1 fail because the strategy to generate signatures won't work when used with the new in initializers syntax.
1 parent 7b9fc09 commit f3906cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ public function provideHashedSignature(): iterable
162162
yield [false, 9, 'private string $priv;'];
163163
}
164164

165+
if (\PHP_VERSION_ID >= 80100) {
166+
yield [true, 17, 'public function ccc($bar = new \stdClass()) {}'];
167+
}
168+
165169
yield [true, 17, 'public function ccc($bar = 187) {}'];
166170
yield [true, 17, 'public function ccc($bar = ANOTHER_ONE_THAT_WILL_NEVER_BE_DEFINED_CCCCCCCCC) {}'];
167171
yield [true, 17, 'public function ccc($bar = parent::BOOM) {}'];

0 commit comments

Comments
 (0)