Skip to content

Commit 7620b97

Browse files
* 7.4: (27 commits) [JsonStreamer] Fix exponential resource class memory growth [Cache] Fix DSN auth not passed to clusters in RedisTrait do not parse "scalar" as an object [Form] Fix OrderedHashMap auto-increment logic with mixed keys [HttpClient] Skip HTTP/3 when using a proxy don't skip custom view transformers while normalizing submitted newlines [Serializer] Fix is/has/can accessor naming regression while preserving collision detection fix exception "Symfony\Component\TypeInfo\Exception\InvalidArgumentException: "Symfony\Component\TypeInfo\Type\UnionType" expects at least 2 types." when property phpdoc is "value-of<Enum>|null" [DoctrineBridge] Fix custom type based on Uid on entity loader let tests fail on PHPUnit notices [PropertyInfo] Throw when phpdocumentor/reflection-docblock v6 is in use (branch 6.4 only) do not use PHPUnit mock objects without configured expectations [Form] Fix ICU 72+ whitespace handling in DateTimeToLocalizedStringTransformer [ErrorHandler] fix parsing of complexe type do not use PHPUnit mock objects without configured expectations [Process] Adjust Process mustRun method phpdoc do not use PHPUnit mock objects without configured expectations do not use PHPUnit mock objects without configured expectations do not use PHPUnit mock objects without configured expectations do not use PHPUnit mock objects without configured expectations ...
2 parents 8720fcb + 8da531f commit 7620b97

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
@@ -1245,7 +1245,7 @@ private function parsePhpDoc(\Reflector $reflector): array
12451245
$static = 'static' === $parts[0];
12461246

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

Tests/DebugClassLoaderTest.php

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