From cd65bdd0c48e8ede5ea2ede70e577aa632d87e73 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 8 Dec 2021 09:59:13 -0700 Subject: [PATCH] Add details to phpstorm.md, fixes #3406 --- .spellcheckwordlist.txt | 2 ++ docs/users/topics/phpstorm.md | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.spellcheckwordlist.txt b/.spellcheckwordlist.txt index 9b804a79834..3f97ac35af9 100644 --- a/.spellcheckwordlist.txt +++ b/.spellcheckwordlist.txt @@ -211,6 +211,8 @@ docker docker's dockerfile docroot +dotfile +dotfiles drud drupal drush diff --git a/docs/users/topics/phpstorm.md b/docs/users/topics/phpstorm.md index 93d97fd940f..2226b0b9d3a 100644 --- a/docs/users/topics/phpstorm.md +++ b/docs/users/topics/phpstorm.md @@ -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. @@ -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 `.`, (Command+Shift+Dot) to show hidden dotfiles. 6. Service: web 7. Add an environment variable `COMPOSE_PROJECT_NAME=ddev-`. 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"