Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 396cc5e

Browse files
committed
[WebserverBundle] Deprecate the bundle in favor of symfony local server
1 parent 519ba3c commit 396cc5e

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 <[email protected]>
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 <[email protected]>
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
{
@@ -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 feature, you should 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

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 <[email protected]>
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
{
@@ -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 feature, you should 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

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 <[email protected]>
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
{
@@ -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 feature, you should 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

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 <[email protected]>
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
{
@@ -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 feature, you should 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

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

2020
/**
2121
* @author Robin Chalas <[email protected]>
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
{
@@ -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

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 <[email protected]>
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 <[email protected]>
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)