Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 400eaa6

Browse filesBrowse files
committed
feature #31217 [WebserverBundle] Deprecate the bundle in favor of symfony local server (Simperfit)
This PR was merged into the 4.4 branch. Discussion ---------- [WebserverBundle] Deprecate the bundle in favor of symfony local server | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | none <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | to do <!-- required for new features --> <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Since most of the feature added to the symfony local server (using php-fpm) will be handy for all developers and as said in #25748 (comment), I agree that we should deprecate the WebserverBundle in favor of the [Symfony Local Server](https://symfony.com/doc/current/setup/symfony_server.html) cc @stof @fabpot Commits ------- 7307907 [WebserverBundle] Deprecate the bundle in favor of symfony local server
2 parents 87a6f04 + 7307907 commit 400eaa6
Copy full SHA for 400eaa6

File tree

Expand file treeCollapse file tree

10 files changed

+38
-0
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+38
-0
lines changed

‎src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
/**
2727
* @author Grégoire Pineau <lyrixx@lyrixx.info>
28+
*
29+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2830
*/
2931
class ServerLogCommand extends Command
3032
{
@@ -78,6 +80,8 @@ protected function configure()
7880

7981
protected function execute(InputInterface $input, OutputInterface $output)
8082
{
83+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
84+
8185
$filter = $input->getOption('filter');
8286
if ($filter) {
8387
if (!class_exists(ExpressionLanguage::class)) {

‎src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
* Runs Symfony application using a local web server.
2727
*
2828
* @author Michał Pipa <michal.pipa.xsolve@gmail.com>
29+
*
30+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2931
*/
3032
class ServerRunCommand extends Command
3133
{
@@ -90,6 +92,8 @@ protected function configure()
9092
*/
9193
protected function execute(InputInterface $input, OutputInterface $output)
9294
{
95+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
96+
9397
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9498

9599
if (null === $documentRoot = $input->getOption('docroot')) {

‎src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
* Runs a local web server in a background process.
2727
*
2828
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
29+
*
30+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2931
*/
3032
class ServerStartCommand extends Command
3133
{
@@ -90,6 +92,8 @@ protected function configure()
9092
*/
9193
protected function execute(InputInterface $input, OutputInterface $output)
9294
{
95+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
96+
9397
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9498

9599
if (!\extension_loaded('pcntl')) {

‎src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* the background.
2626
*
2727
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
28+
*
29+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2830
*/
2931
class ServerStatusCommand extends Command
3032
{
@@ -72,6 +74,8 @@ protected function configure()
7274
*/
7375
protected function execute(InputInterface $input, OutputInterface $output)
7476
{
77+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
78+
7579
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
7680
$server = new WebServer($this->pidFileDirectory);
7781
if ($filter = $input->getOption('filter')) {

‎src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* Stops a background process running a local web server.
2424
*
2525
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
26+
*
27+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2628
*/
2729
class ServerStopCommand extends Command
2830
{
@@ -61,6 +63,8 @@ protected function configure()
6163
*/
6264
protected function execute(InputInterface $input, OutputInterface $output)
6365
{
66+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
67+
6468
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
6569

6670
try {

‎src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
/**
2121
* @author Robin Chalas <robin.chalas@gmail.com>
22+
*
23+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2224
*/
2325
class WebServerExtension extends Extension
2426
{
@@ -40,6 +42,8 @@ public function load(array $configs, ContainerBuilder $container)
4042
if (!class_exists(ConsoleFormatter::class)) {
4143
$container->removeDefinition('web_server.command.server_log');
4244
}
45+
46+
@trigger_error('Using the WebserverBundle is deprecated since 4.3, the new symfony local server has more feature, you should use it instead.');
4347
}
4448

4549
private function getPublicDirectory(ContainerBuilder $container)

‎src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Tests/DependencyInjection/WebServerExtensionTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
class WebServerExtensionTest extends TestCase
2020
{
21+
/**
22+
* @group legacy
23+
*/
2124
public function testLoad()
2225
{
2326
$container = new ContainerBuilder();

‎src/Symfony/Bundle/WebServerBundle/WebServer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/WebServer.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Manages a local HTTP web server.
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
22+
*
23+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2224
*/
2325
class WebServer
2426
{

‎src/Symfony/Bundle/WebServerBundle/WebServerBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/WebServerBundle.php
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313

1414
use Symfony\Component\HttpKernel\Bundle\Bundle;
1515

16+
/**
17+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
18+
*/
1619
class WebServerBundle extends Bundle
1720
{
21+
public function boot()
22+
{
23+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
24+
}
1825
}

‎src/Symfony/Bundle/WebServerBundle/WebServerConfig.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/WebServerConfig.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
/**
1515
* @author Fabien Potencier <fabien@symfony.com>
16+
*
17+
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
1618
*/
1719
class WebServerConfig
1820
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.