Skip to content

Commit c2ee39c

Browse files
Merge branch '6.4' into 7.3
* 6.4: [DoctrineBridge] Fix custom type based on Uid on entity loader [PropertyInfo] Throw when phpdocumentor/reflection-docblock v6 is in use (branch 6.4 only) [ErrorHandler] fix parsing of complexe type
2 parents 429d9e5 + 8c18400 commit c2ee39c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

DebugClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ private function parsePhpDoc(\Reflector $reflector): array
12441244
$static = 'static' === $parts[0];
12451245

12461246
for ($i = $static ? 2 : 0; null !== $p = $parts[$i] ?? null; $i += 2) {
1247-
if (\in_array($p, ['', '|', '&', 'callable'], true) || \in_array(substr($returnType, -1), ['|', '&'], true)) {
1247+
if (\in_array($p, ['', 'callable'], true) || \in_array(substr($returnType, -1), ['|', '&'], true) || \in_array($p[0], ['|', '&'], true)) {
12481248
$returnType .= trim($parts[$i - 1] ?? '').$p;
12491249
continue;
12501250
}

Tests/DebugClassLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class_exists('Test\\'.ExtendsVirtual::class, true);
333333
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::invalidInterfaceMethod(): unknownType".',
334334
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::invalidInterfaceMethodNoBraces(): unknownType|string".',
335335
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::complexInterfaceMethod($arg, ...$args)".',
336-
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::complexInterfaceMethodTyped($arg, int ...$args): string[]|int": Description ...',
336+
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::complexInterfaceMethodTyped($arg, int ...$args): array<string, int>|string[]|int": Description ...',
337337
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::staticMethodNoBraces(): mixed".',
338338
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::staticMethodTyped(int $arg): \stdClass": Description.',
339339
'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::staticMethodTypedNoBraces(): \stdClass[]".',

Tests/Fixtures/VirtualInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* @method unknownType|string invalidInterfaceMethodNoBraces
2222
*
2323
* Complex
24-
* @method complexInterfaceMethod($arg, ...$args)
25-
* @method string[]|int complexInterfaceMethodTyped($arg, int ...$args) Description ...
24+
* @method complexInterfaceMethod($arg, ...$args)
25+
* @method array<string, int>|string[]|int complexInterfaceMethodTyped($arg, int ...$args) Description ...
2626
*
2727
* Static
2828
* @method static Foo&Bar staticMethod()

0 commit comments

Comments
 (0)