I didn’t use PHPStorm in particular, but I have a similar setup in VSCode (for golang):
- Create a new script
~/.local/bin/php with contents:#!bin/sh
toolbox run php
- Make sure PHPStorm has
~/.local/bin/ in PATH and it earlier than other php binaries in your system
This would make the app run ~/.local/bin/php, which is in fact running a command in a toolbox container