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

Commita40048e

Browse files
author
Robin Chalas
committed
[FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options
1 parentb6758e9 commita40048e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Console/Application.php‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,16 @@ public function getKernel()
6363
publicfunctiondoRun(InputInterface$input,OutputInterface$output)
6464
{
6565
if ($input->hasParameterOption(array('-e','--env'),true)) {
66-
@trigger_error('The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2. Set the "APP_ENV" environment variable instead.',E_USER_DEPRECATED);
66+
$notice ='The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2, set the "APP_ENV" environment variable instead.';
67+
$io = (newSymfonyStyle($input,$output))->getErrorStyle();
68+
$io->warning($notice);
69+
@trigger_error($notice,E_USER_DEPRECATED);
6770
}
6871

6972
if ($input->hasParameterOption('--no-debug',true)) {
70-
@trigger_error('The "--no-debug" option is deprecated since Symfony 4.2. Set the "APP_DEBUG" environment variable to "0" instead.',E_USER_DEPRECATED);
73+
$notice ='The "--no-debug" option is deprecated since Symfony 4.2, set the "APP_DEBUG" environment variable to "0" instead.';
74+
($io ?? (newSymfonyStyle($input,$output))->getErrorStyle())->warning($notice);
75+
@trigger_error($notice,E_USER_DEPRECATED);
7176
}
7277

7378
$this->kernel->boot();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp