-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Deprecate the special SYMFONY__ environment variables #21889
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
Changes from 1 commit
2b8b6c7
4374128
924e18c
1c08baa
a1ba61d
247d17e
9e99d7b
d9e2375
b55f181
3ed6d2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -742,6 +742,22 @@ public function testKernelRootDirNameStartingWithANumber() | |
$this->assertEquals('_123', $kernel->getName()); | ||
} | ||
|
||
/** | ||
* @group legacy | ||
* @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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
*/ | ||
public function testSymfonyEnvironmentVariables() | ||
{ | ||
$_SERVER['SYMFONY__FOO__BAR'] = 'baz'; | ||
|
||
$kernel = $this->getKernel(); | ||
$method = new \ReflectionMethod($kernel, 'getEnvParameters'); | ||
$method->setAccessible(true); | ||
|
||
$envParameters = $method->invoke($kernel); | ||
$this->assertSame('baz', $envParameters['foo.bar']); | ||
} | ||
|
||
/** | ||
* Returns a mock for the BundleInterface. | ||
* | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
%env()%
should be%%env()%%