Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
910 stars 138 forks source link

#[Route] attribute on method cannot be found if preceded by another attribute #2381

Open alcohol opened 1 month ago

alcohol commented 1 month ago

May or may not be related to #2176 ?

This does not work:

#[IsGranted('ROLE_ADMIN')]
#[Route(path: '/admin', name: 'admin', methods: ['GET', 'POST'])]
public function admin(Request $request): Response

This works:

#[Route(path: '/admin', name: 'admin', methods: ['GET', 'POST'])]
#[IsGranted('ROLE_ADMIN')]
public function admin(Request $request): Response
iquito commented 1 month ago

I am having the same issue (with PhpStorm 2024.1.2 and Symfony Support Plugin 2024.1.274), routes seem to be ignored/not found if the Route attribute is preceded by another attribute.