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

PHP Class Generator (Composer PSR-4)

damianbal

|
16,115 installs
| (4) | Free
VSCode Extenstion to Generate PHP PSR-4 Classes
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Class Generator (Composer PSR-4)

VS Code extension which helps creating PHP classes in project which is configured to use Composer PSR-4 autoloading.

Note: composer.json (with PSR-4 autoloading configured) file is required in project (workspace).

Old version of this extension can be found here but it doesn't support PSR-4.

Demo

Creating class using wizard

Wizard

Inserting namespace

Namespace

Inserting class/interface/trait

Class

Inserting namespace (using context menu)

Class

Features

  • Generate PHP class/interfce/trait (using wizard)
  • Insert PHP class/interface/trait (inserting to already created file)
  • Insert PSR-4 Namespace at selected line in PHP file with command or context menu

Commands

  • "PHP Class Generator: Generate class/interface/trait (Wizard)"
  • "PHP Class Generator: Insert PSR-4 namespace"
  • "PHP Class Generator: Insert PSR-4 class/interface/trait"
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft