January 6, 2017 Javier Eguiluz

PHP 5.4 version introduced a built-in web server that can be used to run your PHP applications locally during development without the need to configure a full-featured web server such as Apache or Nginx.

Symfony adopted this technique a while ago by providing some console commands to control that web server. In Symfony 3.3 we decided to move those commands to a new bundle called WebServerBundle.

The main reason is that moving the commands make them more easily discoverable and more decoupled. Discoverability is specially important when not using the symfony/symfony dependency. In that case, the commands are not available unless you have the symfony/process component installed. With a dedicated bundle, installing the bundle also installs the dependency, making the whole process easier.

In any case, this new bundle won't change the way you work with the local web server:

1 2 3 4 5 6 7 # start a web server in the foreground and see the logs $ bin/console server:run # start, stop and manage a web server in the background $ bin/console server:start $ bin/console server:stop $ bin/console server:status