![]() ![]() If you click the refresh icon next to the PHP executable path, you can check which PHP version was found on the Docker service/container.ħ.) Let's navigate in Settings to Languages & Frameworks > PHP > Quality Tools. ![]() To do this, you should set a name, select the service running PHP, in our case app_server, then change the lifecycle to Connect to existing container and set the path to the PHP executable file for your project ( /usr/local/bin/php). as a new CLI Interpreter.Ħ.) Now we need to configure the new CLI interpreter. We want to add our docker container as new CLI Interpreter.ĥ.) In the new dialog window you should click on the plus icon in the upper left corner and select From Docker, Vagrant, VM, WSL, Remote. At the CLI Interpreter line you have to click on the three dots for adding an new CLI Interpreter. On the right side of the window you should see a message with Connection successful.Ĥ.) Navigate in Settings to Languages & Frameworks > PHP. Navigate in Settings to Build, Execution, Deployment > Docker. Check if the needed plugins (Docker and PHP Docker) in PHPStorm are activated.ģ.) We should test if the docker connection is working. The output of the command should look similar like in the picture below.Ģ.) Open Settings > Plugins. Also docker is installed and working.ġ.) With the command below you can check on your Terminal if the containers for the project you wanna set up are running (if not docker-compose up -d could help). Requirements: The quality tools you wanna use are already installed via Composer (if not check how to install them). ![]() In this post I will guide you through the setup with many screenshots. PHPStan, installed in this project via Composer. But if you already have some Docker containers set up for your project, you should use the same PHP version and the same tool version, e.g. I suspect that most developers use a local configuration for these PHP > Quality Tools. In PHPStorm you can set up PHP > Quality Tools that will check your code as you code. Configure PHPStan in PHPStorm to use PHP from Docker Container ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |