8000 [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
Next Next commit
Revert "[FrameworkBundle] Deprecate the "--env" and "--no-debug" opti…
…ons"

This reverts commit 9f60ff8.
  • Loading branch information
Robin Chalas committed Nov 7, 2018
commit 8be3b81983c4f080af6ef39644e0d162eae14d7a
3 changes: 0 additions & 3 deletions UPGRADE-4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ FrameworkBundle
```
* The `ContainerAwareCommand` class has been deprecated, use `Symfony\Component\Console\Command\Command`
with dependency injection instead.
* The `--env` console option and its "-e" shortcut have been deprecated,
set the "APP_ENV" environment variable instead.
* The `--no-debug` console option has been deprecated,
set the "APP_DEBUG" environment variable to "0" instead.
* The `Templating\Helper\TranslatorHelper::transChoice()` method has been deprecated, use the `trans()` one instead with a `%count%` parameter.
* Deprecated support for legacy translations directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`, use `translations/` instead.
Expand Down
4 changes: 0 additions & 4 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ FrameworkBundle
* Added support for the SameSite attribute for session cookies. It is highly recommended to set this setting (`framework.session.cookie_samesite`) to `lax` for increased security against CSRF attacks.
* The `ContainerAwareCommand` class has been removed, use `Symfony\Component\Console\Command\Command`
with dependency injection instead.
* The `--env` console option and its "-e" shortcut have been removed,
set the "APP_ENV" environment variable instead.
* The `--no-debug` console option has been removed,
set the "APP_DEBUG" environment variable to "0" instead.
* The `Templating\Helper\TranslatorHelper::transChoice()` method has been removed, use the `trans()` one instead with a `%count%` parameter.
* Removed support for legacy translations directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`, use `translations/` instead.
* Support for the legacy directory structure in `translation:update` and `debug:translation` commands has been removed.
Expand Down
3 changes: 0 additions & 3 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ CHANGELOG
* Removed the `framework.messenger.encoder` and `framework.messenger.decoder` options. Use the `framework.messenger.serializer.id` option to replace the Messenger serializer.
* Deprecated the `ContainerAwareCommand` class in favor of `Symfony\Component\Console\Command\Command`
* Made `debug:container` and `debug:autowiring` ignore backslashes in service ids
* Deprecated the `--env` console option and its "-e" shortcut, set
the "APP_ENV" environment variable instead.
* Deprecated the `--no-debug` console option, set the "APP_DEBUG"
environment variable to "0" instead.
* Deprecated the `Templating\Helper\TranslatorHelper::transChoice()` method, use the `trans()` one instead with a `%count%` parameter
* Deprecated `CacheCollectorPass`. Use `Symfony\Component\Cache\DependencyInjection\CacheCollectorPass` instead.
Expand Down
13 changes: 0 additions & 13 deletions src/Symfony/Bundle/FrameworkBundle/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ public function getKernel()
*/
public function doRun(InputInterface $input, OutputInterface $output)
{
if ($input->hasParameterOption(array('-e', '--env'), true)) {
$notice = 'The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2, set the "APP_ENV" environment variable instead.';
$io = (new SymfonyStyle($input, $output))->getErrorStyle();
$io->warning($notice);
@trigger_error($notice, E_USER_DEPRECATED);
}

if ($input->hasParameterOption('--no-debug', true)) {
$notice = 'The "--no-debug" option is deprecated since Symfony 4.2, set the "APP_DEBUG" environment variable to "0" instead.';
($io ?? (new SymfonyStyle($input, $output))->getErrorStyle())->warning($notice);
@trigger_error($notice, E_USER_DEPRECATED);
}

$this->kernel->boot();

$this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));
Expand Down
0