(3) On the right pane, at the right of the Interpreter select box, click on […].

(4) At the top of the Interpreters pop up, click on [+], and select [Remote…].

(5) On the Configure Remote PHP Interpreter pop up, select Vagrant.

(6) After connecting, click on [OK].

(7) When it stops doing stuff, rename the interpreter. Then click on [OK].

(8) On the PHP pane again, above the the Interpreter select box, select the PHP language level, then click on [Apply] and on [OK].

(9) Add a Remote Interpreter for PHPUnit, pointing to the VVV server like this:

(10) Create a Run/Debug configuration for PHPUnit like this:

Probably you will also need to restart PHPStorm.

I really wanted to get through it to be able to debug tests later, but to just run them all it’s not very convenient. It takes double the time. 15 minutes from the command line, 30 minutes from PHPStorm!!

This is a small class for handling Regular Expressions in PHP. I often have to use backreferences and it’s very cumbersome to compose simple expressions with them into more complex ones, because I have to manually count all capturing groups many times in a row. This class basically solves that issue for me.