Skip to content

Used imports are marked as unused #3482

@mspirkov

Description

@mspirkov

Describe the bug

Used imports are marked as unused. This happens when a class is imported only to import a PHPStan type from it.

To Reproduce

  1. Create 2 classes with different namespaces.
  2. Add a PHPStan type to one class.
  3. Import the PHPStan type in the other class.

Expected behavior

The import is marked as used.

Screenshots

Image

Platform and version

OS: Windows 10
Intelephense version: 1.16.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions