Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>PHP Dynamic SnippetsNew to Visual Studio Code? Get it now.
PHP Dynamic Snippets

PHP Dynamic Snippets

M-Zoldak

|
36 installs
| (0) | Free
Dynamically filled PHP snippets according to PSR-4 format
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Dynamic Snippets

Not gonna lie, most code was written by Chat-GPT. :)

Features

For now, extension brings 3 snippets with it:\

php - boilerplate for php file with fulfilled namespace and class name

<?php

namespace __AutomaticallyFilledPSR4Namespace__;

class __ClassFromFilename__{}


namespace - outputs automatically filled namespace according to path and psr-4 definition

namespace __AutomaticallyFilledPSR4Namespace__;


class - outputs class with current filename

class __ClassFromFilename__{}

Requirements

  • composer.json must exist in folder structure above file from where the class is being created/edited
  • psr-4 paths defined inside composer.json
// composer.json
{
  "psr-4": {
    "Tests\\": "tests/",
    "App\\": "src/"
  }
}

Extension Settings

Currently no settings available

Release Notes

1.0.2

  • add loading for "autoload-dev" declarations

1.0.1

  • add namespaces caching

1.0.0

Initial release.

  • Snippets php, namespace, class
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft