-
Notifications
You must be signed in to change notification settings - Fork 1
3. Getting set up (PhpStorm)
Oleg Kuzava edited this page Jan 10, 2020
·
4 revisions
Docker is configured at File -> Settings -> Build, Execution, Deployment -> Docker
. Click the green ➕ and add these details:
For Linux:
- Name:
Docker
- Connect to Docker daemon with:
Unix socket
For MacOS:
- Name:
Docker
- Connect to Docker daemon with:
Docker for Mac
orDocker Machine
(if you have VirtualBox installation)
- PHP is configured at
File -> Settings -> Languages & Frameworks -> PHP
- The
PHP language level
should be set to the recommended version7.2
- Click the 3 dots on the right side (CLI Interpreter) to open up the
CLI Interpreters
dialog. On that screen click the green ➕ and selectFrom Docker, Vagrant, VM, Remote...
:- Remote:
Docker
- Server:
Docker
- Image name:
docksal/cli:php7.2
- PHP interpreter path:
php
- Remote:
- Leave the
Visible only for this project
unchecked - Here is example of configured
CLI
:
- Set
XDEBUG_ENABLED=1
in.docksal/docksal-local.env
in your project - Apply container configuration with
fin project start
(fin p start
) - Xdebug is configured at
File -> Settings -> Languages & Frameworks -> PHP -> Debug
- Here is example of configured
Xdebug
:
- Under
Preferences > Languages & Frameworks > PHP > Servers
add a new server - Set
Name
andHost
to project's virtual host (e.g. d8.docksal) - Map the project directory on the host to
/var/www
on the server - Here is example of configured
Servers
:
- Code Sniffer is configured at
File -> Settings -> Languages & Frameworks -> PHP -> Quality Tools -> Code Sniffer
- Click the 3 dots on the right side (Deployment environment) to open up the
Code Sniffer
dialog. On that screen click the green ➕ and selectdocksal/cli:php7.2
asInterpreter
- Here is example of configured Code Sniffer:
- Make sure you have enabled
PHP Code Sniffer Validation
atFile -> Settings -> Editor -> Inspections
:
🎉 🎉 🎉 Congratulations! You are ready! 🎉 🎉 🎉