Improve the first time setup configuration
Issue
When you install this plugin for the first time and have the project already opened inside PhpStorm, settings like CLI interpreter are not changed automatically.
This is not obvious to beginners, and I want us to explore if there is a way to improve this.
Steps to reproduce
- Open a DDEV project in PhpStorm.
- Uninstall DDEV integration plugin and close PhpStorm.
- Delete the
.ideafolder from the project root. - Open the project in PhpStorm again, go to Settings > PHP, see the CLI Interpreter settings:
- Install DDEV integration plugin
- Go to Settings > PHP, see the CLI Interpreter settings (the new interpreter has been added but not selected):
- Close PhpStorm, delete the
.ideafolder in the project root. - Open the project in PhpStorm again, check the Settings, new setup is ready without any manual changes:
Suggestion
It looks like the plugin applies its settings only when a project is opened for the first time. For new users, it can be confusing that existing projects already opened in PhpStorm get the new configuration but aren't updated automatically after the plugin is installed.
It's good that the plugin avoids changing existing configurations, but this isn't obvious to users right after installation. You'd typically expect it to not only add new config but also apply it immediately.
If there's a way to detect and trigger initial setup for already opened projects, it would be useful to immediately apply settings like PHP CLI and Node interpreter.
Alternative
After installing the plugin, delete the .idea project folder to let the plugin to run its first-time setup logic.
I'm adding a tip about this in:
- https://github.com/ddev/ddev/pull/7331
If this can't be done, feel free to close the issue.
Thanks for raising this issue @stasadev.
I haven't used PhpStorm for a while, but just now tried to get breakpoints to work in PHPStorm and DDEV (I updated the Drupal doc page) and it seems like it got even easier, since the "Docker V2" step is no longer needed. In fact, the "Tools" item is not there ...
It's this step in the ddev-intellij-plugin: https://github.com/ddev/ddev-intellij-plugin/wiki/Configuration#additional-settings
And talking about instructions, the section in the DDEV PhpStorm docs under "Prerequisite" seems redundant, at least for Linux:
Prerequisite
Regardless of your setup, make PhpStorm use DDEV’s private docker-compose executable.
In PhpStorm, navigate to Preferences → Build, Execution, Deployment → Docker, and set the docker-compose executable to the absolute path of DDEV’s private docker-compose binary, which is $HOME/.ddev/bin/docker-compose.
If you’re using WSL2 and running PhpStorm on the Windows side, PhpStorm can’t use docker-compose from WSL2, so configure Docker Desktop in Settings → General to “Use Docker Compose V2” and use a recent version of docker-compose either from Docker Desktop or installed another way.
https://docs.ddev.com/en/stable/users/install/phpstorm/#prerequisite
I spent some time trying to find out where I should set this now ... only to realize that everything seems to be pre-configured and work very well, out-of-the box, very impressive!
Yay, I don't see any docker-compose configuration in PhpStorm (macOS) any more, unless I'm forgetting where it was. This was a long-term misunderstanding from JetBrains. (youtrack issue
If you concur, please click the pencil in the ddev docs page and remove those instructions about docker-compose.
However, I don't know how you configure it to use the DDEV-provided private docker-compose any more (which is less important these days since docker-compose is more stable)
Thanks for a fast response as always @rfay, I greatly appreciate it. I have made a Merge Request (https://github.com/ddev/ddev/pull/7621) which removes the "Prerequisite" section.
I also added a link to the Drupal DDEV PhpStorm doc page, since there are a few potential bumps, like opening the firewall, and also just to offer a Drupal + DDEV + PhpStorm QuickStart to the DDEV Drupal users. (I know how you feel about CMS-specific content ...)
List supported CMSes on the DDEV PhpStorm plugin page?
Like I wrote to @stasadev, the Drupal + DDEV + PhpStorm integration out-of-the-box is literally complete, and there is no need to configure anything. Adding plugins such as DDEV, and the rest, seems to be all that's required -- basically the six most popular ones:
https://plugins.jetbrains.com/search?search=drupal&orderBy=downloads
Actually, I would love it if the DDEV Integration plugin was also listed alongside the Drupal-specific plugins in the search above. "DDEV Integration" plugin would squeeze itself in as number 5, between "Drupal Symfony Bridge" and "Drupal Namespace Detector", with its 45'000 downloads.
Perhaps you could consider adding a single line, which lists some of the supported CMSes?
[...] Integrated DDEV Terminal And much more coming soon! Supports Laravel, WordPress, Drupal, TYPO3, Backdrop, Magento, Craft CMS and more.
<<< ADD THIS?]
If that's not enough to get "DDEV Integration" included in a "Drupal" search, perhaps ("behind the scene") in the PhpStorm UI there are "Supported CMSes" checkboxes which can be checked?
Actually, I would love it if the DDEV Integration plugin was also listed alongside the Drupal-specific plugins in the search above. "DDEV Integration" plugin would squeeze itself in as number 5, between "Drupal Symfony Bridge" and "Drupal Namespace Detector", with its 45'000 downloads.
@AkibaAT probably knows how to do this if it's just a plugin admin config change.
Actually, I would love it if the DDEV Integration plugin was also listed alongside the Drupal-specific plugins in the search above. "DDEV Integration" plugin would squeeze itself in as number 5, between "Drupal Symfony Bridge" and "Drupal Namespace Detector", with its 45'000 downloads.
@AkibaAT probably knows how to do this if it's just a plugin admin config change.
From what I know, the search takes the plugin metadata. The Symfony Plugin and PHP Annotations get found because they mention a Drupal plugin in the description: https://github.com/Haehnchen/idea-php-annotation-plugin/blob/612173314e5f9a7d9125eedc799800824a62a7f9/src/main/resources/META-INF/plugin.xml#L46
Thanks for checking @AkibaAT.
If you both agree that it's a great idea (I am not sure ... there was no opinion expressed) can we try to add the suggested line?
And now that we're on the topic of documentation, it would be extremely useful with a fresh DDEV + PhpStorm + Xdebug (and Drupal?) video from September 2025.
I would be especially helpful for new users, since it all looks very daunting, and complicated to set up -- when it's really not. As long as you know the right steps, in the right order :)
The last DDEV + PhpStorm video is from August 2020:
Debugging Code in No Time with DDEV-Local, PhpStorm, and Xdebug
Perhaps include demo of these things as well in a new video, to really show case just what a powerful combination it is, using a CMS such as Drupal as an example?
- Getting Drupal development-ready, installing top 5 PhpStorm Drupal plug-ins, and showing code completion
- Demoing Xdebug breakpoints
- More?
Since everything more or less works out of the box, perhaps first do a "QuickStart-style" fast-run, with minimal configuration, except for the required steps, like installing plug-ins.
Only after that, open up the can of worms of showing all the complex configuration, which is indeed possible :)
this step in the ddev-intellij-plugin: Wiki: Configuration (additional settings)
I've added a footer to this wiki:
https://github.com/ddev/ddev-intellij-plugin/wiki
I would propose disabling the wiki or making it redirect to checked-in docs instead. GitHub wikis have always seemed like a mistake to me.
I created a dedicated issue to my video suggestion, to not derail this issue:
- https://github.com/ddev/ddev/issues/7631
I also created an issue here, about listing supported CMSes on the DDEV PhpStorm plugin page as suggested in https://github.com/ddev/ddev-intellij-plugin/issues/442#issuecomment-3289483349:
- #498