Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/Symfony/Component/DependencyInjection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CHANGELOG
* added ability to define a static priority method for tagged service
* added support for improved syntax to define method calls in Yaml
* added `LazyString` for lazy computation of string values injected into services
* made the `%env(base64:...)%` processor able to decode base64url

4.3.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function getEnv($prefix, $name, \Closure $getEnv)
}

if ('base64' === $prefix) {
return base64_decode($env);
return base64_decode(strtr($env, '-_', '+/'));
}

if ('json' === $prefix) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ public function testGetEnvBase64()
});

$this->assertSame('hello', $result);

$result = $processor->getEnv('base64', 'foo', function ($name) { return '/+0='; });
$this->assertSame("\xFF\xED", $result);

$result = $processor->getEnv('base64', 'foo', function ($name) { return '_-0='; });
$this->assertSame("\xFF\xED", $result);
}

public function testGetEnvTrim()
Expand Down