Skip to content

Commit 54474c2

Browse files
Merge branch '5.4' into 6.0
* 5.4: Fix CI by removing ext-mongodb [ErrorHandler] fix parsing `@param` with dollars in the description [SecurityBundle] Fix wrong array key [SecurityBundle] Fix listing listeners in profiler when authenticator manager is disabled Fix FlattenException::setPrevious argument typing bug #43941 [FrameworkBundle] Comment design decision [DependencyInjection] fix auto-refresh when inline_factories is enabled
2 parents 3291ba2 + 734f2b6 commit 54474c2

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

DebugClassLoader.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,11 +1183,8 @@ private function parsePhpDoc(\Reflector $reflector): array
11831183
if (false === $i = strpos($param, '$')) {
11841184
continue;
11851185
}
1186-
if (false !== $j = strpos($param, ' $') ?: strpos($param, '&$')) {
1187-
$i = 1 + $j;
1188-
}
11891186

1190-
$type = 0 === $i ? '' : rtrim(substr($param, 0, $i - 1));
1187+
$type = 0 === $i ? '' : rtrim(substr($param, 0, $i), ' &');
11911188
$param = substr($param, 1 + $i, (strpos($param, ' ', $i) ?: (1 + $i + \strlen($param))) - $i - 1);
11921189

11931190
$tags['param'][$param] = $type;

Exception/FlattenException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function getPrevious(): ?self
233233
/**
234234
* @return $this
235235
*/
236-
public function setPrevious(self $previous): static
236+
public function setPrevious(?self $previous): static
237237
{
238238
$this->previous = $previous;
239239

Tests/DebugClassLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ class_exists(Fixtures\SubClassWithAnnotatedParameters::class, true);
295295
'The "Symfony\Component\ErrorHandler\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "callable $callback" argument in the next major version of its interface "Symfony\Component\ErrorHandler\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.',
296296
'The "Symfony\Component\ErrorHandler\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "string $param" argument in the next major version of its interface "Symfony\Component\ErrorHandler\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.',
297297
'The "Symfony\Component\ErrorHandler\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "callable $anotherOne" argument in the next major version of its interface "Symfony\Component\ErrorHandler\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.',
298-
'The "Symfony\Component\ErrorHandler\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "Type$WithDollarIsStillAType $ccc" argument in the next major version of its interface "Symfony\Component\ErrorHandler\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.',
299298
'The "Symfony\Component\ErrorHandler\Tests\Fixtures\SubClassWithAnnotatedParameters::isSymfony()" method will require a new "true $yes" argument in the next major version of its parent class "Symfony\Component\ErrorHandler\Tests\Fixtures\ClassWithAnnotatedParameters", not defining it is deprecated.',
300299
], $deprecations);
301300
}

Tests/Fixtures/InterfaceWithAnnotatedParameters.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ interface InterfaceWithAnnotatedParameters
1313
public function whereAmI();
1414

1515
/**
16-
* @param $noType
16+
* @param $noType with $dollar after
1717
* @param callable(\Throwable|null $reason, mixed $value) $callback and a comment
1818
* about this great param
1919
* @param string $param (comment with $dollar)
2020
* @param $defined
2121
* @param callable ($a, $b) $anotherOne
2222
* @param callable (mixed $a, $b) $definedCallable
23-
* @param Type$WithDollarIsStillAType $ccc
2423
* @param \JustAType
2524
*/
2625
public function iAmHere();

0 commit comments

Comments
 (0)