Changing the default deployment when changing task
Greetings
I'm working on several projects using the same code base but different deployments.
When I work on a different project, I change the task but I also have to go to the preferences dialog to switch the default deployment server (which I usually forget to do).
Is there a way to "couple" a task with a deployment? ie. changing to a given task would automatically change the deployment.
Another (better) way which could be even more interesting would be an external command to switch both (I'm using a Streamdeck to switch between projects).
Thanks in advance
Regards
Please sign in to leave a comment.
I think the case when you work with the same codebase on several projects is relatively rare, that's why there's no such feature.
Usually, it's at least different branches, you can assign a branch to a task and commit different default servers to different branches.
You don't have to though. For a couple of releases, we have the default deployment server widget in the status bar, so you can switch from it. Would that do?
Thanks for your answer! I understand my use case is quite rare.
Thanks for pointing me at the widget, I missed it but I will use it from now.
What about a way to set that from an external call? is it possible? :)
Regards
Sorry, missed that part. Unfortunately, no IDE settings can be configured command-line, deployment can't be as well.
I tried modifying the .xml file, but unfortunately, PhpStorm doesn't pick the change up without re-opening the project, so it won't work either.
I wonder, would it be hard for a plugin to open a port, listen to a string, and execute this string as an IDE "action" name? like ctrl-shift-A does?
Also, I found that some function can be called from CLI (https://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html) maybe that could be expanded?
It depends on how proficient you are with Java in general and with the IntelliJ platform specifically.
Here are the plugin development docs: https://plugins.jetbrains.com/docs/intellij/phpstorm.html
I've managed to find the following feature request, it even has deployment mentioned in the comments, so I think this case can be added there: https://youtrack.jetbrains.com/issue/IDEA-158008/Allow-Preference-Configuration-via-Command-Line
Thanks for the followup. I have 0 knowledge of java or developing a plugin :(
The request you mentioned relates to my situation mainly on the last comment, however the initial problem of the poster is probably solved now that PhpStorm has automatic config for xdebug.
I'm quite intrigued by the CLI interface, which provides 4 commands; I don't understand how it could be useful: if I'm inside the IDE I don't need the CLI, and if I don't want to use the IDE there are lighter tools to do the same job... why these 4 and not others?
While there are lighter tools, those tools do not necessarily cover ones needs. Many prefer to use the IntelliJ platform because their development process is built around it.
Why not others - it's a question of how much demand there is for a certain feature. The feature request I've posted only got three votes over the span of six years, so there's not much demand for it.