Skip to content

Commit dfd8eaa

Browse files
committed
feature #21889 Deprecate the special SYMFONY__ environment variables (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21889). Discussion ---------- Deprecate the special SYMFONY__ environment variables | Q | A | | --- | --- | | Branch? | master | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | yes | | Tests pass? | yes | | Fixed tickets | #20089 | | License | MIT | | Doc PR | - | Commits ------- e3362e854c Deprecate the special SYMFONY__ environment variables
2 parents bfe4959 + 6030682 commit dfd8eaa

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

Tests/Functional/CachePoolsTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717

1818
class CachePoolsTest extends WebTestCase
1919
{
20-
protected function setUp()
21-
{
22-
$_SERVER['SYMFONY__REDIS_HOST'] = getenv('REDIS_HOST');
23-
}
24-
25-
protected function tearDown()
26-
{
27-
unset($_SERVER['SYMFONY__REDIS_HOST']);
28-
}
29-
3020
public function testCachePools()
3121
{
3222
$this->doTestCachePools(array(), FilesystemAdapter::class);

Tests/Functional/app/CachePools/redis_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
imports:
22
- { resource: ../config/default.yml }
33

4+
parameters:
5+
env(REDIS_HOST): 'localhost'
6+
47
framework:
58
cache:
69
app: cache.adapter.redis
7-
default_redis_provider: "redis://%redis_host%"
10+
default_redis_provider: "redis://%env(REDIS_HOST)%"
811
pools:
912
cache.pool1:
1013
public: true

Tests/Functional/app/CachePools/redis_custom_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
imports:
22
- { resource: ../config/default.yml }
33

4+
parameters:
5+
env(REDIS_HOST): 'localhost'
6+
47
services:
58
cache.test_redis_connection:
69
public: false
710
class: Redis
811
calls:
9-
- [connect, ['%redis_host%']]
12+
- [connect, ['%env(REDIS_HOST)%']]
1013

1114
cache.app:
1215
parent: cache.adapter.redis

0 commit comments

Comments
 (0)