Skip to content

Commit 3ad8da9

Browse files
author
Robin Chalas
committed
Revert "[WebServerBundle] Deprecate relying on --env in server:start and server:run"
This reverts commit 31b5615.
1 parent 8be3b81 commit 3ad8da9

File tree

5 files changed

+0
-24
lines changed

5 files changed

+0
-24
lines changed

UPGRADE-4.2.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,3 @@ Validator
359359
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated
360360
* Using the `Email` constraint in strict mode without `egulias/email-validator` is deprecated
361361
* Using the `Expression` constraint without `symfony/expression-language` is deprecated
362-
363-
WebServerBundle
364-
---------------
365-
366-
* Omitting the `$environment` argument of the `ServerRunCommand` and
367-
`ServerStartCommand` constructors is deprecated.

UPGRADE-5.0.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,3 @@ Workflow
282282
* `add` method has been removed use `addWorkflow` method in `Workflow\Registry` instead.
283283
* `SupportStrategyInterface` has been removed, use `WorkflowSupportStrategyInterface` instead.
284284
* `ClassInstanceSupportStrategy` has been removed, use `InstanceOfSupportStrategy` instead.
285-
286-
WebServerBundle
287-
---------------
288-
289-
* Omitting the `$environment` argument of the `ServerRunCommand` and
290-
`ServerStartCommand` constructors now throws a `\TypeError`.

src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ CHANGELOG
44
4.2.0
55
-----
66

7-
* Deprecated omitting the `$environment` argument of the `ServerRunCommand` and
8-
`ServerStartCommand` constructors
97
* Added ability to display the current hostname address if available when binding to 0.0.0.0
108

119
3.4.0

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class ServerRunCommand extends Command
3636

3737
public function __construct(string $documentRoot = null, string $environment = null)
3838
{
39-
if (!$environment) {
40-
@trigger_error(sprintf('Omitting the $environment argument of the "%s" constructor is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
41-
}
42-
4339
$this->documentRoot = $documentRoot;
4440
$this->environment = $environment;
4541

@@ -103,7 +99,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
10399
$documentRoot = $this->documentRoot;
104100
}
105101

106-
// @deprecated since Symfony 4.2
107102
if (!$env = $this->environment) {
108103
if ($input->hasOption('env') && !$env = $input->getOption('env')) {
109104
$io->error('The environment must be either passed as second argument of the constructor or through the "--env" input option.');

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class ServerStartCommand extends Command
3636

3737
public function __construct(string $documentRoot = null, string $environment = null)
3838
{
39-
if (!$environment) {
40-
@trigger_error(sprintf('Omitting the $environment argument of the "%s" constructor is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
41-
}
42-
4339
$this->documentRoot = $documentRoot;
4440
$this->environment = $environment;
4541

@@ -116,7 +112,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
116112
$documentRoot = $this->documentRoot;
117113
}
118114

119-
// @deprecated since Symfony 4.2
120115
if (!$env = $this->environment) {
121116
if ($input->hasOption('env') && !$env = $input->getOption('env')) {
122117
$io->error('The environment must be either passed as second argument of the constructor or through the "--env" input option.');

0 commit comments

Comments
 (0)