question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import @Route is never used

See original GitHub issue

I got a Symfony controller using the “Route” annotation. Since my upgrade from PhpStorm 2016.3 to 2016.3.1, I got a warning telling me that the use statement for Route is never used.

Symfony Plugin v 0.12.131 PHP Annotations v 4.2 Phpstorm v. 2016.3.1

namespace MyIssueNameSpace;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

/**
 * Class ContestController
 * @Route("/contest")
 */
class ContestController extends Controller
{
// ..
}

image

I do not know if i am posting this issue to the right project. Thanks for your help !

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:13
  • Comments:6

github_iconTop GitHub Comments

6reactions
arkstecommented, Dec 8, 2016

Can confirm. PHP Annotations Plugin is working on 2016.3, but not on 2016.3.1.

1reaction
ragusa87commented, Dec 9, 2016

@Scifa Thanks for your feedback. As it’s a PhpStorm issue (https://youtrack.jetbrains.com/issue/WI-34285), I will close this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Router is never used, but Routes do not work without importing it
This answer is useful. 1. This answer is not useful. Save this answer. Show activity on this post. first routes should come between...
Read more >
Routing (Symfony Docs)
The feature to import routes from a PSR-4 namespace root was introduced in Symfony 6.2. Suppose you want to define a route for...
Read more >
OSPF import-route direct not working when using vpn-instance
I am using some 5820X 24XG SFP+ (JC102A) running OSPF with multiple vpn-instances. I have some trouple with the import-route direct command, it ......
Read more >
Route import - HERE Developer
The Route Import service is a REST API that accepts GPS trace points and sub-set of routing parameters. The resulting response will contain...
Read more >
PHP/Symfony: inspection claims unused import, but removing ...
When using routing annotations in Symfony, Route must be imported, though used in comments, only. Inspection is wrongly flagging this scenario as warning....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found