Skip to content

Commit 1528213

Browse files
committed
Merge branch '2.4-develop' of https://github.com/magento/magento2ce into PR-10-14
2 parents 009a037 + afd7ecc commit 1528213

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

app/code/Magento/Config/Test/Mftf/Suite/AppConfigDumpSuite.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
99
<suite name="AppConfigDumpSuite">
1010
<before>
11+
<!-- Command app:config:dump is not reversible and magento instance stays configuration read only after this test. You need to restore etc/env.php manually to make magento configuration writable again.-->
1112
<magentoCLI command="app:config:dump" stepKey="configDump"/>
1213
</before>
1314
<after>

app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
<features value="Configuration"/>
1414
<stories value="Disable configuration inputs"/>
1515
<title value="Check that all input fields disabled after executing CLI app:config:dump"/>
16-
<description value="Check that all input fields disabled after executing CLI app:config:dump"/>
16+
<description value="Check that all input fields disabled after executing CLI app:config:dump. Command app:config:dump is not reversible and magento instance stays configuration read only after this test. You need to restore etc/env.php manually to make magento configuration writable again."/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MC-11158"/>
1919
<useCaseId value="MAGETWO-96428"/>
2020
<group value="configuration"/>
2121
</annotations>
2222
<before>
23+
<!-- Command app:config:dump is not reversible and magento instance stays configuration read only after this test. You need to restore etc/env.php manually to make magento configuration writable again.-->
2324
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2425
</before>
2526
<after>

lib/internal/Magento/Framework/Session/Config.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ class Config implements ConfigInterface
2828
/** Configuration path for session cache limiter */
2929
const PARAM_SESSION_CACHE_LIMITER = 'session/cache_limiter';
3030

31+
/** Configuration path for session garbage collection probability */
32+
private const PARAM_SESSION_GC_PROBABILITY = 'session/gc_probability';
33+
34+
/** Configuration path for session garbage collection divisor */
35+
private const PARAM_SESSION_GC_DIVISOR = 'session/gc_divisor';
36+
37+
/**
38+
* Configuration path for session garbage collection max lifetime.
39+
* The number of seconds after which data will be seen as 'garbage'.
40+
*/
41+
private const PARAM_SESSION_GC_MAXLIFETIME = 'session/gc_maxlifetime';
42+
3143
/** Configuration path for cookie domain */
3244
const XML_PATH_COOKIE_DOMAIN = 'web/cookie/cookie_domain';
3345

@@ -102,6 +114,7 @@ class Config implements ConfigInterface
102114
* @param string $scopeType
103115
* @param string $lifetimePath
104116
* @SuppressWarnings(PHPMD.NPathComplexity)
117+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
105118
*/
106119
public function __construct(
107120
\Magento\Framework\ValidatorFactory $validatorFactory,
@@ -149,6 +162,30 @@ public function __construct(
149162
$this->setOption('session.cache_limiter', $cacheLimiter);
150163
}
151164

165+
/**
166+
* Session garbage collection probability
167+
*/
168+
$gcProbability = $deploymentConfig->get(self::PARAM_SESSION_GC_PROBABILITY);
169+
if ($gcProbability) {
170+
$this->setOption('session.gc_probability', $gcProbability);
171+
}
172+
173+
/**
174+
* Session garbage collection divisor
175+
*/
176+
$gcDivisor = $deploymentConfig->get(self::PARAM_SESSION_GC_DIVISOR);
177+
if ($gcDivisor) {
178+
$this->setOption('session.gc_divisor', $gcDivisor);
179+
}
180+
181+
/**
182+
* Session garbage collection max lifetime
183+
*/
184+
$gcMaxlifetime = $deploymentConfig->get(self::PARAM_SESSION_GC_MAXLIFETIME);
185+
if ($gcMaxlifetime) {
186+
$this->setOption('session.gc_maxlifetime', $gcMaxlifetime);
187+
}
188+
152189
/**
153190
* Cookie settings: lifetime, path, domain, httpOnly. These govern settings for the session cookie.
154191
*/

0 commit comments

Comments
 (0)