![]() ![]() Click on the + and add a PHPUnit configuration.Point the PHP Executable to the shell script.Click on the + in the upper-left and select Other Local.Add a new CLI Interpreter by clicking on the.Go to Preferences » Languages & Frameworks » PHP.composer global require phpunit/phpunit (ignore the root user warning).mv composer.phar /usr/local/bin/composerĪfter Composer is installed you need to install PHPUnit.apt-get update & apt-get install -y wget.The easiest way to do this is to do run the following: Then, right-click on the site in Local, go to “Open Site SSH”, and install Composer if it isn’t already. # Copy PHPStorm's wrapper file into the containerĭocker exec $DOCKER_CONTAINER mkdir -p $PHPUNIT_WRAPPER_PATHĭocker cp $PHPUNIT_WRAPPER $DOCKER_CONTAINER:$PHPUNIT_WRAPPERĭocker exec $DOCKER_CONTAINER php saving that shell script and running chmod +x on it, you’ll need to adjust the variables at the top of the file to match your setup. We need only what's after /appĬONFIG_PATH=$(echo $5 | grep -o "/app/.*$")Įval $(docker-machine env $DOCKER_MACHINE) # Update config path since PHPStorm will always pass the host system path. PHPUNIT_WRAPPER_PATH=$(dirname $PHPUNIT_WRAPPER)Īlias docker="'$LOCAL_PATH/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker'"Īlias docker-machine="'$LOCAL_PATH/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine'" LOCAL_PATH='/Applications/Local by Flywheel.app' I’ve came up with a shell script that you can use to trick PhpStorm into using Local’s PHP.įirst off, here’s the shell script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |