Skip to content

Commit f6bf2a2

Browse files
MAGETWO-62491: [PR] Delivery of stories (sprint 3)
1 parent 13434f5 commit f6bf2a2

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

app/code/Magento/Config/Model/Config/Processor/EnvironmentPlaceholder.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Framework\App\Config\Spi\PreProcessorInterface;
1111
use Magento\Framework\Stdlib\ArrayManager;
1212

13+
/**
14+
* Allows to extract configurations from environment variables.
15+
*/
1316
class EnvironmentPlaceholder implements PreProcessorInterface
1417
{
1518
/**
@@ -41,7 +44,10 @@ public function __construct(
4144
}
4245

4346
/**
44-
* @inheritdoc
47+
* Method extracts environment variables.
48+
* If environment variable is matching the desired rule - it's being used as value.
49+
*
50+
* {@inheritdoc}
4551
*/
4652
public function process(array $config)
4753
{

app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ class SettingChecker
2727
*/
2828
private $placeholder;
2929

30-
/**
31-
* @var array|null
32-
*/
33-
private $environmentVariables;
34-
3530
/**
3631
* @var ScopeCodeResolver
3732
*/
@@ -97,12 +92,8 @@ public function getPlaceholderValue($path, $scope, $scopeCode = null)
9792
*/
9893
public function getEnvValue($placeholder)
9994
{
100-
if (null === $this->environmentVariables) {
101-
$this->environmentVariables = $_ENV;
102-
}
103-
104-
if ($this->placeholder->isApplicable($placeholder) && isset($this->environmentVariables[$placeholder])) {
105-
return $this->environmentVariables[$placeholder];
95+
if ($this->placeholder->isApplicable($placeholder) && isset($_ENV[$placeholder])) {
96+
return $_ENV[$placeholder];
10697
}
10798

10899
return null;

lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
/**
1717
* Deployment configuration writer to files: env.php, config.php (config.local.php, config.dist.php)
18-
*
19-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2018
*/
2119
class Writer
2220
{

0 commit comments

Comments
 (0)