8000 Deprecate the special SYMFONY__ environment variables by javiereguiluz · Pull Request #20100 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Deprecate the special SYMFONY__ environment variables #20100

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 4 commits into from
Closed
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
Prev Previous commit
Next Next commit
Include the name of the env variable in the deprecation message
  • Loading branch information
javiereguiluz committed Mar 6, 2017
commit cea85ea07b8dad39d65333150b051bf8d1efe06b
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ protected function getEnvParameters()
$parameters = array();
foreach ($_SERVER as $key => $value) {
if (0 === strpos($key, 'SYMFONY__')) {
@trigger_error('SYMFONY__ special environment variables are deprecated as of 3.2 and will be removed in 4.0. Use instead the %env()% syntax to get the value of environment variables in configuration files.', E_USER_DEPRECATED);
@trigger_error(sprintf('The special environment variables that start with SYMFONY__ (such as "%s") are deprecated as of 3.2 and will be removed in 4.0. Use instead the %env()% syntax to get the value of environment variables in configuration files.', $key), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.3

$parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;
}
}
Expand Down
0