Skip to content

Commit d9a0912

Browse files
Remove BC layers related to new methods and new parameters
1 parent e7837b1 commit d9a0912

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.0
5+
---
6+
7+
* Add argument `$reflector` to `ArgumentResolverInterface::getArguments()` and `ArgumentMetadataFactoryInterface::createArgumentMetadata()`
8+
49
6.4
510
---
611

Controller/ArgumentResolverInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ interface ArgumentResolverInterface
2424
/**
2525
* Returns the arguments to pass to the controller.
2626
*
27-
* @param \ReflectionFunctionAbstract|null $reflector
28-
*
2927
* @throws \RuntimeException When no value could be provided for a required argument
3028
*/
31-
public function getArguments(Request $request, callable $controller/* , \ReflectionFunctionAbstract $reflector = null */): array;
29+
public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array;
3230
}

Controller/TraceableArgumentResolver.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@ public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stop
2828
$this->stopwatch = $stopwatch;
2929
}
3030

31-
/**
32-
* @param \ReflectionFunctionAbstract|null $reflector
33-
*/
34-
public function getArguments(Request $request, callable $controller/* , \ReflectionFunctionAbstract $reflector = null */): array
31+
public function getArguments(Request $request, callable $controller, \ReflectionFunctionAbstract $reflector = null): array
3532
{
36-
$reflector = 2 < \func_num_args() ? func_get_arg(2) : null;
3733
$e = $this->stopwatch->start('controller.get_arguments');
3834

3935
try {

ControllerMetadata/ArgumentMetadataFactoryInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
interface ArgumentMetadataFactoryInterface
2020
{
2121
/**
22-
* @param \ReflectionFunctionAbstract|null $reflector
23-
*
2422
* @return ArgumentMetadata[]
2523
*/
26-
public function createArgumentMetadata(string|object|array $controller/* , \ReflectionFunctionAbstract $reflector = null */): array;
24+
public function createArgumentMetadata(string|object|array $controller, \ReflectionFunctionAbstract $reflector = null): array;
2725
}

Tests/Controller/TraceableArgumentResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testStopwatchEventIsStoppedWhenResolverThrows()
2929
$stopwatch->method('start')->willReturn($stopwatchEvent);
3030

3131
$resolver = new class() implements ArgumentResolverInterface {
32-
public function getArguments(Request $request, callable $controller): array
32+
public function getArguments(Request $request, callable $controller, ?\ReflectionFunctionAbstract $reflector = null): array
3333
{
3434
throw new \Exception();
3535
}

0 commit comments

Comments
 (0)