Visual Studio Code configuration for Yii development

Let’s make it clear from the beginning: the best IDE for any PHP project is JetBrains PHPStorm.

But if you want to stay in the free/open area there are very few contenders. It first used to be Eclipse, then appeared Netbeans (recently adopted by Apache foundation). Both of them are Java based, and as any project sharing the same base are dead slow and memory hungry. While Netbeans slightly better, they’re really slow.

Then, in the open era of Microsoft, Visual Studio Code appeared! At first sight it looked like a nice IDE: clean, modern, fast.

So I started lazily using it. I found there’s a huge community around the project, hundreds of extensions available for the most desperate enhancement. As always many extensions means a lot of crappy ones.

I mostly develop in PHP, with Yii, and sometimes in Javascript with Vue.js. I’m listing here the few ones I found very useful, if not necessary, for developing in these technologies.

  • PHP Intelephense by Ben Mewburn
    There are really a lot of intellisense extensions available for PHP, but I found this the most feature rich. To be honest, the ones I tried before were barely of any help other than base PHP functions. PHP Intelephense also works very well with Yii;
  • GitLens by Eric Amodio
    This is the top rating of Git extensions, and indeed it’s a fantastic tool for the VCS. I still often use git from command line, but the extension allows you to do everything from the GUI. Diffs, logs, merges…
  • Deploy (Reloaded) by Marcel J. Kloubert
    It’s often useful to have an automated action to deploy source files to dev and staging environment. And who doesn’t develop in production? This extension does exactly that: copying source files to a destination server, using the preferred backend (FTP, SFTP, among the others). It does not have a UI, you need to compile VSCode’s settings.json manually, but it perfectly does its job;
  • Bracket Pair Colorizer 2 by CoenraadS
    How many times you’re lost in the maze of open and closed brackets? Being them square, curly or rounded this extension colours them differently, helping you to find out where it all began. It’s a small feature but often very useful;
  • Vetur by Pine Wu
    It’s the must extension for Vue development.

I try to keep my list of extensions very short, as I don’t want my VSCodium to become Eclipse. But if you have other suggestions let me know.

4 pensieri su “Visual Studio Code configuration for Yii development

  1. nice post!
    Many PHP extensions are incomplete and do not support framework syntax, PHP Intelephense is cool.
    the last extension is Vuetur -> Vetur.

  2. Hello
    thank you for the hints

    Do you have any kind link to some “PHP Intelephense how to” ?

    I mean shorhands list e.g. instead of typing “public function” some “pubf” or similar with tab completition . Is there some cheatsheet about that? Or another extension is needed?

    Thank you for hints and tips

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
30 − 29 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.