Skip to content

Commit

Permalink
Add details to phpstorm.md, fixes ddev#3406
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Dec 8, 2021
1 parent 022f1fc commit cd65bdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .spellcheckwordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ docker
docker's
dockerfile
docroot
dotfile
dotfiles
drud
drupal
drush
Expand Down
3 changes: 2 additions & 1 deletion docs/users/topics/phpstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is based on the wonderful [article](https://web.archive.org/web/20210514053
#### Requirements

- PhpStorm 2021.2 or higher
- You may need to add the `PHP Docker` plugin.
- docker-compose v1. Due to a [bug or two in PhpStorm](https://youtrack.jetbrains.com/issue/WI-61205), it can't properly interpret docker-compose v2 output as of Sept 2021. If this is still a problem, you can `ddev config global --required-docker-compose-version=v1.29.2` to globally require docker-compose v1.
- Any OS platform, but if you're using Windows PhpStorm with WSL2 the path mappings are slightly more complex. WSL2 instructions are provided where necessary.

Expand All @@ -22,7 +23,7 @@ This is based on the wonderful [article](https://web.archive.org/web/20210514053
2. Choose "Docker Compose"
3. Create a server; the default name is "docker", but since the "server" for each project will be different, name it for the project, for example "DDEV d9". Choose "Docker for Windows" or "Docker for Mac"
4. In the "Path mappings" of the "Server" you may have to map the local paths (which on WSL2 means /home/...) to the in-container paths, especially if you have mutagen enabled. So "Virtual Machine Path" would be "/var/www/html" and "Local path" would be something like /Users/rfay/workspace/d9 (on macOS) or \\wsl$\Ubuntu\home\rfay\workspace\d9 on Windows using WSL2.
5. Now back in the "Configure Remote PHP Interpreter" for "Configuration files" use `.ddev/.ddev-docker-compose-full.yaml`
5. Now back in the "Configure Remote PHP Interpreter" for "Configuration files" use `.ddev/.ddev-docker-compose-full.yaml`. On macOS, you may need to use `<cmd><shift>.`, (Command+Shift+Dot) to show hidden dotfiles.
6. Service: web
7. Add an environment variable `COMPOSE_PROJECT_NAME=ddev-<projectname>`. In this case, it's `ddev-d9`. (Note that DDEV project names that contain dots do not currently work due to a [PhpStorm bug](https://youtrack.jetbrains.com/issue/WI-63293). You'll need to rename your project to get these instructions to work.)
8. In the CLI interpreter "Lifecycle" select "Connect to existing container"
Expand Down

0 comments on commit cd65bdd

Please sign in to comment.