Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHP Unused RemoveNew to Visual Studio Code? Get it now.
PHP Unused Remove

PHP Unused Remove

icescrown

|
1 install
| (0) | Free
A VSCode extension to remove unused imports in PHP files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Unused Imports Remover

A VSCode extension to remove unused imports in PHP files automatically.

Features

  • Automatically detect unused use statements in PHP files
  • Supports both single use statements and grouped use statements
  • Keyboard shortcut for quick operation: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
  • User-friendly messages after operation completion
  • PHP file specific to avoid accidental changes to other file types

Requirements

No external dependencies required. Works with any PHP file in VSCode.

Usage

  1. Open a PHP file in VSCode
  2. Press Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
  3. The extension will automatically remove all unused use statements

Example

Before:

<?php

use App\Models\User;
use App\Models\Post;
use App\Models\Comment;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

class TestClass
{
    public function testMethod()
    {
        $user = new User();
        $data = DB::table('users')->get();
        
        return $user;
    }
}

After:

<?php

use App\Models\User;
use Illuminate\Support\Facades\DB;

class TestClass
{
    public function testMethod()
    {
        $user = new User();
        $data = DB::table('users')->get();
        
        return $user;
    }
}

Extension Settings

This extension currently has no configurable settings.

Known Issues

  • No known issues at this time.

Release Notes

0.0.3

  • Initial release
  • Support for single use statements
  • Support for grouped use statements
  • Keyboard shortcut implementation
  • Basic error handling

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft