Skip to content

Commit

Permalink
bug #32501 [FrameworkBundle] Fix descriptor of routes described as ca…
Browse files Browse the repository at this point in the history
…llable array (ribeiropaulor)

This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Fix descriptor of routes described as callable array

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32324
| License       | MIT
| Doc PR        |

The recent changes introduced a bug when routes are defined as callable array. Even statically is possible to see that the previous code was broken. I did not introduced any new tests. The current test case already does not test describing route collection that has fileLinkFormatter defined.

Commits
-------

c5ee4be [FrameworkBundle] Fix descriptor of routes described as callable array
  • Loading branch information
fabpot committed Jul 12, 2019
2 parents a2dce3a + c5ee4be commit 70c7424
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -540,7 +540,7 @@ private function formatControllerLink($controller, string $anchorText): string

try {
if (\is_array($controller)) {
$r = new \ReflectionMethod($controller);
$r = new \ReflectionMethod($controller[0], $controller[1]);
} elseif ($controller instanceof \Closure) {
$r = new \ReflectionFunction($controller);
} elseif (method_exists($controller, '__invoke')) {
Expand Down

0 comments on commit 70c7424

Please sign in to comment.