You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the MakerBundle test suite, while testing a normal [Route()] above a traditional controller action method:
Uncaught PHP Exception Error: "Attribute "Symfony\Component\Routing\Annotation\Route" cannot target function (allowed targets: class, method)" at /.../vendor/symfony/http-kernel/Event/ControllerEvent.php line 82
The problem seems to come from the ReflectionFunction... which seems to confuse the attributes system.
Cheers!
How to reproduce
In Symfony 6.2, create a #[Route] and then go to the page for that route.
Possible Solution
I'm not familiar with the implications of using ReflectionFunction vs ReflectionMethod, but it seems we need ReflectionMethod for the attributes to be instantiated correctly?
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
6.2.x-dev
Description
Hi!
Currently, the new
_controller_reflectors
inControllerEvent
- https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/HttpKernel/Event/ControllerEvent.php#L64-L66 - is causing theRoute
attribute to break.From the MakerBundle test suite, while testing a normal
[Route()]
above a traditional controller action method:The problem seems to come from the ReflectionFunction... which seems to confuse the attributes system.
Cheers!
How to reproduce
In Symfony 6.2, create a
#[Route]
and then go to the page for that route.Possible Solution
I'm not familiar with the implications of using
ReflectionFunction
vsReflectionMethod
, but it seems we needReflectionMethod
for the attributes to be instantiated correctly?Additional Context
No response
The text was updated successfully, but these errors were encountered: