Skip to content

Commit f6c97a6

Browse files
committed
[WebserverBundle] Deprecate the bundle in favor of symfony local server
1 parent 7e56ef1 commit f6c97a6

File tree

10 files changed

+38
-0
lines changed

10 files changed

+38
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
/**
2626
* @author Grégoire Pineau <lyrixx@lyrixx.info>
27+
*
28+
* @deprecated since version 4.4, to be removed in 5.0; the new symfony local server has more feature, you should use it instead.
2729
*/
2830
class ServerLogCommand extends Command
2931
{
@@ -77,6 +79,8 @@ protected function configure()
7779

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

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

Lines 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 feature, you should use it instead.
2931
*/
3032
class ServerRunCommand extends Command
3133
{
@@ -88,6 +90,8 @@ protected function configure()
8890
*/
8991
protected function execute(InputInterface $input, OutputInterface $output)
9092
{
93+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
94+
9195
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9296

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

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

Lines 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 feature, you should use it instead.
2931
*/
3032
class ServerStartCommand extends Command
3133
{
@@ -88,6 +90,8 @@ protected function configure()
8890
*/
8991
protected function execute(InputInterface $input, OutputInterface $output)
9092
{
93+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
94+
9195
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9296

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

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

Lines 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 feature, you should use it instead.
2830
*/
2931
class ServerStatusCommand extends Command
3032
{
@@ -63,6 +65,8 @@ protected function configure()
6365
*/
6466
protected function execute(InputInterface $input, OutputInterface $output)
6567
{
68+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
69+
6670
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
6771
$server = new WebServer();
6872
if ($filter = $input->getOption('filter')) {

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

Lines 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 feature, you should use it instead.
2628
*/
2729
class ServerStopCommand extends Command
2830
{
@@ -52,6 +54,8 @@ protected function configure()
5254
*/
5355
protected function execute(InputInterface $input, OutputInterface $output)
5456
{
57+
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
58+
5559
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
5660

5761
try {

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

Lines 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 feature, you should use it instead.
2224
*/
2325
class WebServerExtension extends Extension
2426
{
@@ -34,6 +36,8 @@ public function load(array $configs, ContainerBuilder $container)
3436
if (!class_exists(ConsoleFormatter::class)) {
3537
$container->removeDefinition('web_server.command.server_log');
3638
}
39+
40+
@trigger_error('Using the WebserverBundle is deprecated since 4.3, the new symfony local server has more feature, you should use it instead.');
3741
}
3842

3943
private function getPublicDirectory(ContainerBuilder $container)

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

Lines 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

Lines 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 feature, you should use it instead.
2224
*/
2325
class WebServer
2426
{

src/Symfony/Bundle/WebServerBundle/WebServerBundle.php

Lines 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 feature, you should 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 feature, you should use it instead.', E_USER_DEPRECATED);
24+
}
1825
}

src/Symfony/Bundle/WebServerBundle/WebServerConfig.php

Lines 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 feature, you should use it instead.
1618
*/
1719
class WebServerConfig
1820
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy