10000 [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options by chalasr · Pull Request #29126 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options #29126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "[WebServerBundle] Deprecate relying on --env in server:start …
…and server:run"

This reverts commit 31b5615.
  • Loading branch information
Robin Chalas committed Nov 7, 2018
commit 3ad8da9bcae94c56301896234c4fa00af7eb6d86
6 changes: 0 additions & 6 deletions UPGRADE-4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,3 @@ Validator
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated
* Using the `Email` constraint in strict mode without `egulias/email-validator` is deprecated
* Using the `Expression` constraint without `symfony/expression-language` is deprecated

WebServerBundle
---------------

* Omitting the `$environment` argument of the `ServerRunCommand` and
`ServerStartCommand` constructors is deprecated.
6 changes: 0 additions & 6 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,3 @@ Workflow
* `add` method has been removed use `addWorkflow` method in `Workflow\Registry` instead.
* `SupportStrategyInterface` has been removed, use `WorkflowSupportStrategyInterface` instead.
* `ClassInstanceSupportStrategy` has been removed, use `InstanceOfSupportStrategy` instead.

WebServerBundle
---------------

* Omitting the `$environment` argument of the `ServerRunCommand` and
`ServerStartCommand` constructors now throws a `\TypeError`.
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/WebServerBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ CHANGELOG
4.2.0
-----

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

3.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class ServerRunCommand extends Command

public function __construct(string $documentRoot = null, string $environment = null)
{
if (!$environment) {
@trigger_error(sprintf('Omitting the $environment argument of the "%s" constructor is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
}

$this->documentRoot = $documentRoot;
$this->environment = $environment;

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

// @deprecated since Symfony 4.2
if (!$env = $this->environment) {
if ($input->hasOption('env') && !$env = $input->getOption('env')) {
$io->error('The environment must be either passed as second argument of the constructor or through the "--env" input option.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class ServerStartCommand extends Command

public function __construct(string $documentRoot = null, string $environment = null)
{
if (!$environment) {
@trigger_error(sprintf('Omitting the $environment argument of the "%s" constructor is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
}

$this->documentRoot = $documentRoot;
$this->environment = $environment;

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

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