Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHP import checkerNew to Visual Studio Code? Get it now.

PHP import checker

Marabesi

marabesi.com
|
76,377 installs
| (3) | Free
Know when you are importing a class and is not using it in the file, easy and fast, inspired by PHPStorm
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

php-import-checker

Codacy Badge Build status Coverage Status

Buy Me A Coffee

php-import-checker helps you know when a given class is imported but not used, providing a easy way to keep your code clean and organized.

PHP import checker - VScode extension to support PHP developers

Features

  • Highlight every unused class that is imported with use
  • Change the color to fit your theme
  • opt-in for latest changes and give feedback

Settings

The settings described in this section go under the json option php.import.highlight, a basic configuration that would change the highlight color, would be something like:

"php.import.highlight": {
  "color": "#EDF791",
  "use_next_version": false
  "ignore_comments": true
}
Option Type Description
color String Uses the RGB color defined in this option to highlight the unused imports - helpful to match the color with your preferred theme.
use_next_version Boolean Opt-in to the latest changes to the extension without breaking current behavior. Note: if you are using this option and find anything wrong, please open an issue.
ignore_comments Boolean If set to true, does not take into account commented code - this option only works if use_next_version is set to true

Requirements

Visual Code 1.6 +

Demos

  • Manually invoke the extension checker

Highlight unused imports

  • Change the color to the one you want to

Change highlight color

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft