You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -573,13 +573,19 @@ protected function getKernelParameters()
573
573
* Only the parameters starting with "SYMFONY__" are considered.
574
574
*
575
575
* @return array An array of parameters
576
+
*
577
+
* @deprecated since version 3.3, to be removed in 4.0
576
578
*/
577
579
protectedfunctiongetEnvParameters()
578
580
{
581
+
if (0 === func_num_args() || func_get_arg(0)) {
582
+
@trigger_error(sprintf('The %s() method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED);
583
+
}
584
+
579
585
$parameters = array();
580
586
foreach ($_SERVERas$key => $value) {
581
587
if (0 === strpos($key, 'SYMFONY__')) {
582
-
@trigger_error(sprintf('The support of special environment variables that start with SYMFONY__ (such as "%s") is deprecated as of 3.3 and will be removed in 4.0. Use the %env()% syntax instead to get the value of environment variables in configuration files.', $key), E_USER_DEPRECATED);
588
+
@trigger_error(sprintf('The support of special environment variables that start with SYMFONY__ (such as "%s") is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax instead to get the value of environment variables in configuration files.', $key), E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -744,6 +744,7 @@ public function testKernelRootDirNameStartingWithANumber()
744
744
745
745
/**
746
746
* @group legacy
747
+
* @expectedDeprecation The Symfony\Component\HttpKernel\Kernel::getEnvParameters() method is deprecated as of 3.3 and will be removed in 4.0. Use the %s syntax to get the value of any environment variable from configuration files instead.
747
748
* @expectedDeprecation The support of special environment variables that start with SYMFONY__ (such as "SYMFONY__FOO__BAR") is deprecated as of 3.3 and will be removed in 4.0. Use the %env()% syntax instead to get the value of environment variables in configuration files.
0 commit comments