Skip to content

Commit e7c3456

Browse files
committed
minor symfony#24486 [DI] Remove colon from env placeholders (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Remove colon from env placeholders | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | snc/SncRedisBundle#356 | License | MIT | Doc PR | - These colons in placeholders make them less neutral. Let's remove them. Commits ------- dca930f [DI] Remove colon from env placeholders
2 parents b43bdf3 + dca930f commit e7c3456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function get($name)
4848
}
4949

5050
$uniqueName = md5($name.uniqid(mt_rand(), true));
51-
$placeholder = sprintf('env_%s_%s', $env, $uniqueName);
51+
$placeholder = sprintf('env_%s_%s', str_replace(':', '_', $env), $uniqueName);
5252
$this->envPlaceholders[$env][$placeholder] = $placeholder;
5353

5454
return $placeholder;

0 commit comments

Comments
 (0)