Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHP Create Class (PSR-4 Multi-dir Fix)New to Visual Studio Code? Get it now.
PHP Create Class (PSR-4 Multi-dir Fix)

PHP Create Class (PSR-4 Multi-dir Fix)

HomelessCoder

|
2 installs
| (0) | Free
Patched: Create Class/Interface/Trait/Enum from context menu. Fixed to support PSR-4 namespaces with multiple directory mappings. Original extension: https://marketplace.visualstudio.com/items?itemName=jaguadoromero.vscode-php-create-class
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Create PHP Class

Create PHP Class for Visual Studio Code

IMPORTANT

This is a fork of the original extension available at "https://marketplace.visualstudio.com/items?itemName=jaguadoromero.vscode-php-create-class". The current implementation supports multiple directories in the PSR-4 autoload configuration. For instance:

    "autoload": {
        "psr-4": {
            "Yournamespace\\": [
                "src/",
                "src/SomeCustomFolder/"
            ]
        }
    }

A Visual Studio Code extension for create Class / Interface / Trait / Enum from context menu in file explorer or in opened file.

The namespace is auto-resolved through composer.json file.

Creating Class

CreateClass

Also can be generated by Generate Class code command.

Creating Interface

CreateInterface

Also can be generated by Generate Interface code command.

Creating Trait

CreateTrait

Also can be generated by Generate Trait code command.

Creating Enum

CreateTrait

Also can be generated by Generate Enum code command.

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