Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[WebServerBundle] Deprecate relying on --env in server:start and server:run#28745

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromchalasr:srv-env
Oct 6, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
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
6 changes: 6 additions & 0 deletionsUPGRADE-4.2.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -231,3 +231,9 @@ Validator
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated
* Using the `Email` constraint 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: 6 additions & 0 deletionsUPGRADE-5.0.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -222,3 +222,9 @@ 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.
6 changes: 6 additions & 0 deletionssrc/Symfony/Bundle/WebServerBundle/CHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

4.2.0
-----

* Deprecated omitting the `$environment` argument of the `ServerRunCommand` and
`ServerStartCommand` constructors

3.4.0
-----

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,10 @@ 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 DownExpand Up@@ -99,6 +103,7 @@ 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,10 @@ 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 DownExpand Up@@ -112,6 +116,7 @@ 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

[8]ページ先頭

©2009-2025 Movatter.jp