Skip to content

Import is considered "used" if FQCN + ::foo() in doc comment. #291

@donquixote

Description

@donquixote

See https://youtrack.jetbrains.com/issue/WI-73430
This only occurs with this plugin enabled.

Steps to Reproduce

use Acme\Plant\Banana;
use Acme\Plant\Strawberry;

/**
 * @see \Acme\Plant\Strawberry
 * @see \Acme\Plant\Banana::foo()
 */
class CC {
}
  1. Enable the plugin. (Later, do the same with the plugin disabled)
  2. Code as above.
  3. Also create the classes for Strawberry and Banana, in the correct namespaces.
  4. Ctrl+Alt+O to remove unused imports.

Expected Result

Both imports are marked as unused.
On Ctrl+Alt+O, both are removed.

Actual Result

The "Banana" import is not marked as unused, and not removed on Ctrl+Alt+O.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions