Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PHP create implementationNew to Visual Studio Code? Get it now.
PHP create implementation

PHP create implementation

Just4Devs

|
621 installs
| (0) | Free
An extension for creating implementations of interfaces and abstract classes in PHP
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP create implementation

A Visual Studio Code extension for implementing all required methods. When called from an interface or abstract class, it will create a new file with the implementation. When called from an implementation, it will check if all required methods are implemented, add any missing methods, and add any missing use namespaces.

Usage

To implement missing methods in the currently open file, use the shortcut Alt + U or the command: Implement all possible methods. Usage gif

Limitations

The extension is designed to work with projects that use Composer, especially for Laravel. Each class or interface must be stored in a separate file; otherwise, some features may not work correctly.

Advanced configuration

By default, when creating a file for an implementation, the Service suffix is added to the name. For interfaces, the Interface suffix and the I prefix are removed if followed by an uppercase letter.

Example:

  • ExampleInterface -> ExampleService,
  • IExample -> ExampleService

In the settings file, you can customize this option using regular expressions to replace matching parts with your specified replacements.

You can configure these settings separately for abstract classes and interfaces. Both suffixes and prefixes are customizable. Additionally, you can choose whether the implemented methods should adhere to PSR-12 standards, such as starting the curly bracket on a new line.

Support

If this extension is helpful to you, you can support my work on Ko-fi.

ko-fi

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