Skip to content

Annotations are ignored when scanning for used/unused imports #7

@Augustin82

Description

@Augustin82

In the following code, Route is imported and used, but is being reported as unused. Conversely, Method is used without being imported, but PHPCS does not mind.

<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

class TestController extends Controller
{
    /**
     * @Route("/test")
     * @Method({"GET"})
     */
    public function postOrderAction()
    {
        return new JsonResponse("", 500);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions