3 VSCode extensions I use for PHP development

kalimahapps

Kalimah Apps

Posted on July 17, 2023

3 VSCode extensions I use for PHP development

TL;DR
All the mentioned extensions are part of PHPKit extension.

1- PHP Intelephense:

Intelephense logo

This extension provides PHP code intelligence for VSCode. I have used it for a long time now and it is consistent and reliable. While it has a premium version, the free one is sufficient for most of my work. The autocompletion and the details on hover are the two most features I utilize.

You can stubs intelephense.stubs settings to make it aware of your code. This is a great feature if you develop, for example, with WordPress because there is a built-in stub for it.

However, for other projects you might struggle a little bit to find and add the stubs. For example, WooCommerce does not have a stub (I could not find any). With Laravel you need to use IDE Helper Generator for Laravel to assist the extension resolving Laravel specific functions.

2- PHP DocBlocker

PHP DocBlocker logo

One of the lacking areas for most developers is documentation. In many projects it is either missing or not complete. I won't go into the reasons for this, but one way to keep the code clear to others (and your future self) is to use docblocks.

This extensions makes the process very easy. If you place the cursor above a function, type /** and then press tab, it will generate a docblock with all related tags.

It is highly configurable but I never found myself needing to change the default values.

3- PHPTaqwim

PHPTaqwim logo

This is one my latest extensions. It is a linter/formatter extension for PHP. I was motivated to create for a few reasons, but the main ones is lack of maintenance and documentation.

The extension provides an extensive set of rules and is thoroughly documented and is highly configurable.

One of the best features is that there is no need for PHP runtime. You don't need to configure PHP executable path at all! Just install and it should work on PHP files.

It also comes as a NPM package, which might be a better option for continuous integration tools.

💖 💪 🙅 🚩
kalimahapps
Kalimah Apps

Posted on July 17, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related