Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64727c1

Browse files
committed
feature #28653 [FrameworkBundle] Deprecate the "--env" and "--no-debug" console options (chalasr)
This PR was merged into the 4.2-dev branch. Discussion ---------- [FrameworkBundle] Deprecate the "--env" and "--no-debug" console options | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | n/a | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 9f60ff8 [FrameworkBundle] Deprecate the "--env" and "--no-debug" options
2 parents 7cc7c71 + 9f60ff8 commit 64727c1

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

UPGRADE-4.2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ FrameworkBundle
110110
```
111111
* The `ContainerAwareCommand` class has been deprecated, use `Symfony\Component\Console\Command\Command`
112112
with dependency injection instead.
113+
* The `--env` console option and its "-e" shortcut have been deprecated,
114+
set the "APP_ENV" environment variable instead.
115+
* The `--no-debug` console option has been deprecated,
116+
set the "APP_DEBUG" environment variable to "0" instead.
113117

114118
Messenger
115119
---------

UPGRADE-5.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ FrameworkBundle
116116
* 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.
117117
* The `ContainerAwareCommand` class has been removed, use `Symfony\Component\Console\Command\Command`
118118
with dependency injection instead.
119+
* The `--env` console option and its "-e" shortcut have been removed,
120+
set the "APP_ENV" environment variable instead.
121+
* The `--no-debug` console option has been removed,
122+
set the "APP_DEBUG" environment variable to "0" instead.
119123

120124
HttpFoundation
121125
--------------

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ CHANGELOG
1414
* Removed the `framework.messenger.encoder` and `framework.messenger.decoder` options. Use the `framework.messenger.serializer.id` option to replace the Messenger serializer.
1515
* Deprecated the `ContainerAwareCommand` class in favor of `Symfony\Component\Console\Command\Command`
1616
* Made `debug:container` and `debug:autowiring` ignore backslashes in service ids
17+
* Deprecated the `--env` console option and its "-e" shortcut, set
18+
the "APP_ENV" environment variable instead.
19+
* Deprecated the `--no-debug` console option, set the "APP_DEBUG"
20+
environment variable to "0" instead.
1721

1822
4.1.0
1923
-----

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ public function getKernel()
6262
*/
6363
public function doRun(InputInterface $input, OutputInterface $output)
6464
{
65+
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);
67+
}
68+
69+
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);
71+
}
72+
6573
$this->kernel->boot();
6674

6775
$this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));

0 commit comments

Comments
 (0)