Can you create a PHP Script Run configuration with variable arguments each time you run it?

So, after creating a run configuration and setting a script and some arguments to be passed to the script as if I was running the script from the command line.

An example would be php foo.php -i12345 --someflag

Now because one of the parameters can be altered I was wondering if I wanted to run the script for some different value of -i is there an easy way for PhpStorm to prompt me for this new value intead of say looking into the run configuration beforehand and altering the value manually?

Thanks!



Attachment(s):
Screen Shot 2013-11-11 at 5.33.35 PM.png
3 comments

Hi there,

The only way (except creating multiple configurations) is to have that "Show this page" checkbox selected, which should show this screen before Configuration will actually be executed (so that you can alter it as required).

If it does not work for you (screen is not shown) then this is because of http://youtrack.jetbrains.com/issue/IDEA-113879 , which is fixed by now (132.894 build), but not yet in PhpStorm v7 (wait untill build number changes to 132.xxx or 133.xxx in "About" screen)

The possible alternative is to use some custom Phing target where you can ask for such parameter and run it as external app...

0

Hi Andriy,

I noticed that and did check that as an option afterwards.

Thanks for the advice.

Is there any way to customize PhpStorm with a plugin / module that would enable this feature more explicitly?

Thanks,
Matt

0
Is there any way to customize PhpStorm with a plugin / module that would enable this feature more explicitly?

I'm not aware of such plugin.

0

Please sign in to leave a comment.