TemPHPest for VSCodeTemPHPest is an extension with one goal; make writing PHP in VSCode better. It does this through a number of features, each of which can be turned on or off in the settings. You still need a language server like Intelephense to provide PHP language features like autocompletion and diagnostics, TemPHPest will provide additional features on top of that. FeaturesStubsWhen creating a new file with the There are also a handful of additional file stubs that are created beyond the standard PSR ones, such as abstract classes if the filename starts with "Abstract", enums if the filename ends with "Enum", Twig components if the file ends with a If the file is in a PSR-4 directory, it will also fill out the namespace in the newly created file. If you're using Laravel and make certain files in the expected directories, the extension will automatically fill out the new file with the stubs Laravel uses for the Additionally, if you prefer to use PHP's Auto RenamingWhen moving or renaming a file in a PSR-4 directory, the class name and namespace inside the file will update to match. The extension can also update all other references to the class in the workspace. Copying and pasting a file will also update the name/namespace to match. If copying a file in the same directory, you'll be asked for a new class name. Code ActionsIn several scenarios, the extension provides "code actions". These are suggestions to help refactor and improve your code. Right now there are a limited number of code actions available, but this will grow with time. Auto Switch to PHP LanguageIf you type Auto InterpolateWhen it looks like you're trying to interpolate a variable inside a single-quote string, for example typing This also works with nowdoc strings, for example typing Surround With SnippetsWhen using the "Surround with Snippet..." command, the extension provides a handful of snippets to use. This allows you to quickly wrap selected code in if statements, try/catch statements, closures, and much more. Snippets are provided for PHP, Twig and Blade syntax. Explorer File NestingVSCode allows files to be visually nested in the explorer view when in the same folder, helping to group them and treat them like a folder, which saves space in the explorer view. The extension automatically nests some common files, such as REPLREPL (Read-Eval-Print Loop) can be enabled on a file to automatically execute the code as you write, showing the output of each value inline. This is powerful for quickly testing code snippets in scratch files. Date Formatting LensWhen viewing a PHP file, the extension will show a lens above any Smart Autocompletion
Blade: Heredoc/Nowdoc Syntax HighlightingWhen using the "BLADE" tag in heredoc and nowdoc strings, the contents will be correctly highlighted as Blade syntax. (Note that you still need an extension to provide Blade syntax highlighting.) Twig: LinksWhen in a file with a Twig: Component CompletionWhen in a file with a |