Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options#29002
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| if ($input->hasParameterOption('--no-debug',true)) { | ||
| @trigger_error('The "--no-debug" option is deprecated since Symfony 4.2. Set the "APP_DEBUG" environment variable to "0" instead.',E_USER_DEPRECATED); | ||
| $notice ='The "--no-debug" option is deprecated since Symfony 4.2. Set the "APP_DEBUG" environment variable to "0" instead.'; | ||
| ($io ?:newSymfonyStyle($input,$outputinstanceof ConsoleOutputInterface ?$output->getErrorOutput() :$output))->warning($notice); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not much relevant, but:
- $io ?: new SymfonyStyle+ $io ?? new SymfonyStyle
| if ($input->hasParameterOption(array('-e','--env'),true)) { | ||
| @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); | ||
| $notice ='The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2. Set the "APP_ENV" environment variable instead.'; | ||
| $io =newSymfonyStyle($input,$outputinstanceof ConsoleOutputInterface ?$output->getErrorOutput() :$output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about using->getErrorStyle() instead?
a195b0c toe3aadcbCompare| { | ||
| if ($input->hasParameterOption(array('-e','--env'),true)) { | ||
| @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); | ||
| $notice ='The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2. Set the "APP_ENV" environment variable instead.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
... since Symfony 4.2, set the ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
done
e3aadcb toa40048eComparefabpot commentedOct 28, 2018
Thank you@chalasr. |
…d --env and --no-debug options (chalasr)This PR was merged into the 4.2-dev branch.Discussion----------[FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options| Q | A| ------------- | ---| Branch? | 4.2| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aCurrently hidden (remember#23328)Commits-------a40048e [FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options
Uh oh!
There was an error while loading.Please reload this page.
Currently hidden (remember#23328)