How to run Symfony web server from PhpStorm

Viewed 11110

Is it possible for me to run Symfony web-server from the PhpStorm? I know I can run it from the command line:

php app/console server:run --env=dev

I just wonder if there is any way how to configure PhpStorm to do it for me.

2 Answers

To setup Symfony CLI on Windows you can use Bash template:

  1. Click Run -> Edit Configurations
  2. In the dialog box Click + (add)
  3. Select Bash from the drop down list
  4. In the name field type Symfony server
  5. In the Script field type serve
  6. In the Interpreter path field put the path to your command console eg: C:\Windows\System32\cmd.exe
  7. In the Interpreter options field type /k "symfony"
  8. In the Program arguments field type --no-tls

Click Ok to save and close the dialog box

Edit Configurations dialog box

Now you can start and stop Symfony server from the top panel:

Run Server

Related