Skip to content

Commit 27e0943

Browse files
authored
ISSUE-33802: ensure that deployment config will reload its data, if the key was not found
Revert method position change for simpler diff review
1 parent acda6b9 commit 27e0943

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ public function get($key = null, $defaultValue = null)
8686
return $result ?? $defaultValue;
8787
}
8888

89+
/**
90+
* Checks if data available
91+
*
92+
* @return bool
93+
* @throws FileSystemException
94+
* @throws RuntimeException
95+
*/
96+
public function isAvailable()
97+
{
98+
return $this->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE) !== null;
99+
}
100+
89101
/**
90102
* Gets a value specified key from config data
91103
*
@@ -111,15 +123,14 @@ public function getConfigData($key = null)
111123
}
112124

113125
/**
114-
* Checks if data available
126+
* Resets config data
115127
*
116-
* @return bool
117-
* @throws FileSystemException
118-
* @throws RuntimeException
128+
* @return void
119129
*/
120-
public function isAvailable()
130+
public function resetData()
121131
{
122-
return $this->get(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE) !== null;
132+
$this->data = [];
133+
$this->flatData = [];
123134
}
124135

125136
/**
@@ -135,17 +146,6 @@ public function isDbAvailable()
135146
return $this->getConfigData('db') !== null;
136147
}
137148

138-
/**
139-
* Resets config data
140-
*
141-
* @return void
142-
*/
143-
public function resetData()
144-
{
145-
$this->data = [];
146-
$this->flatData = [];
147-
}
148-
149149
/**
150150
* Loads the configuration data
151151
*

0 commit comments

Comments
 (0)