If you don't see this create option, wait a bit and right click again. Right click on your docker-compose.yml file and select "Create docker-compose.yml." So putting everything together my PHP project in PhpStorm currently looks like this (it's a new Laravel project I scaffolded for this tutorial).įollow these steps to create a new PhpStorm Run/Debug configuration. In the docker-compose file I'm using for this tutorial I have 3 services (2 database services and one web service) as you can see in this snippet:Įnter fullscreen mode Exit fullscreen mode You can get access to the original files from his Freecodecamp PHP OOP course Github repository. The docker-compose.yml and Dockerfile configuration files I'm using for this article were created by Peter Fisher of How to Code Well and slightly modified by me. Part 1: Configurations for docker-compose.yml, Dockerfile and Xdebug Please be aware that some of the configuration options I am about to discuss are not available in certain older versions of PhpStorm. Note: The information in this article should work well with PhpStorm version 2019.2 and up. Running our test-suite with PhpStorm and PHPUnit (with PHP installed in a docker-compose service container).Debugging our code with PhpStorm and Xdebug (with Xdebug installed in a docker-compose service container).Setting up the PhpStorm IDE so we can start and stop our docker-compose containers from within the IDE.In this article we'll go through the following: I am hoping this resource can be a good reference for myself and for others who might run into the same issues that I ran into. I decided to write this article because I was frustrated by how difficult it was to find all the information I needed to make these technologies work well together in a single article. ![]() Setup PHPStorm to run PHPUnit tests within docker container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |