Skip to content

Commit be85fcc

Browse files
committed
feature symfony#21039 Web server bundle (fabpot)
This PR was squashed before being merged into the 3.3-dev branch (closes symfony#21039). Discussion ---------- Web server bundle | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#21040 | License | MIT | Doc PR | n/a Moved the `server:*` commands to a new bundle. It makes them more easily discoverable and more decoupled. Discoverability is important when not using symfony/symfony. 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. Usage is the same as the current commands for basic usage: To start a web server in the foreground: ``` bin/console server:run ``` To manage a background server: ``` bin/console server:start bin/console server:stop bin/console server:status ``` The big difference is that port is auto-determined if something is already listening on port 8000. Usage is **different** if you pass options: ``` bin/console server:start 127.0.0.1:8888 bin/console server:stop # no need to pass the address again bin/console server:status # no need to pass the address again ``` That's possible as the web server now stores its address in a pid file stored in the current directory. Commits ------- f39b327 [WebServerBundle] switched auto-run of server:start to off by default 961d1ce [WebServerBundle] fixed server:start when already running 126f4d9 [WebServerBundle] added support for port auto-detection 6f689d6 [WebServerBundle] changed the way we keep track of the web server 585d445 [WebServerBundle] tweaked command docs fa7ebc5 [WebServerBundle] moved most of the logic in a new class 951a1a2 [WebServerBundle] changed wording ac1ba77 made the router configurable via env vars 48dd2b0 removed obsolete check 132902c moved server:* command to a new bundle
2 parents 0f50b4d + f39b327 commit be85fcc

22 files changed

+743
-655
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"symfony/validator": "self.version",
7474
"symfony/var-dumper": "self.version",
7575
"symfony/web-profiler-bundle": "self.version",
76+
"symfony/web-server-bundle": "self.version",
7677
"symfony/workflow": "self.version",
7778
"symfony/yaml": "self.version"
7879
},

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
3.3.0
55
-----
66

7+
* The server:* commands and their associated router files were moved to WebServerBundle
78
* Translation related services are not loaded anymore when the `framework.translator` option
89
is disabled.
910
* Added `GlobalVariables::getToken()`

src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php

Lines changed: 0 additions & 69 deletions
This file was deleted.

src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php

Lines changed: 0 additions & 175 deletions
This file was deleted.

0 commit comments

Comments
 (0)