Skip to content

Commit 10f8312

Browse files
Merge branch '2.3.0-release' of github.com:magento/magento2ce into MAGETWO-95798
2 parents 1a745a5 + b4e5a8c commit 10f8312

File tree

11 files changed

+77
-22
lines changed

11 files changed

+77
-22
lines changed

app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<description value="Verify that admin is able to upload image to CMS Page with TinyMCE3 enabled"/>
1818
<severity value="MAJOR"/>
1919
<testCaseId value="MAGETWO-95725"/>
20+
<skip>
21+
<issueId value="MC-5371" />
22+
</skip>
2023
</annotations>
2124
<before>
2225
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

app/code/Magento/Config/App/Config/Type/System.php

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*
2323
* @api
2424
* @since 100.1.2
25+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2526
*/
2627
class System implements ConfigTypeInterface
2728
{
@@ -131,6 +132,32 @@ public function get($path = '')
131132
return $this->getWithParts($path);
132133
}
133134

135+
/**
136+
* Merge newly loaded config data into already loaded.
137+
*
138+
* @param array $newData
139+
* @return void
140+
*/
141+
private function mergeData(array $newData): void
142+
{
143+
if (array_key_exists(ScopeInterface::SCOPE_DEFAULT, $newData)) {
144+
//Sometimes new data may contain links to arrays and we don't want that.
145+
$this->data[ScopeInterface::SCOPE_DEFAULT] = (array)$newData[ScopeInterface::SCOPE_DEFAULT];
146+
unset($newData[ScopeInterface::SCOPE_DEFAULT]);
147+
}
148+
foreach ($newData as $scopeType => $scopeTypeData) {
149+
if (!array_key_exists($scopeType, $this->data)) {
150+
//Sometimes new data may contain links to arrays and we don't want that.
151+
$this->data[$scopeType] = (array)$scopeTypeData;
152+
} else {
153+
foreach ($scopeTypeData as $scopeId => $scopeData) {
154+
//Sometimes new data may contain links to arrays and we don't want that.
155+
$this->data[$scopeType][$scopeId] = (array)$scopeData;
156+
}
157+
}
158+
}
159+
}
160+
134161
/**
135162
* Proceed with parts extraction from path.
136163
*
@@ -143,8 +170,10 @@ private function getWithParts($path)
143170

144171
if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) {
145172
if (!isset($this->data[$pathParts[0]])) {
173+
//First filling data property with unprocessed data for post-processors to be able to use.
146174
$data = $this->readData();
147-
$this->data = array_replace_recursive($this->data, $this->postProcessor->process($data));
175+
//Post-processing only the data we know is not yet processed.
176+
$this->mergeData($this->postProcessor->process($data));
148177
}
149178

150179
return $this->data[$pathParts[0]];
@@ -154,12 +183,11 @@ private function getWithParts($path)
154183

155184
if ($scopeType === ScopeInterface::SCOPE_DEFAULT) {
156185
if (!isset($this->data[$scopeType])) {
157-
$this->data = array_replace_recursive(
158-
$this->data,
159-
$scopeData = $this->loadDefaultScopeData($scopeType)
160-
);
186+
//Adding unprocessed data to the data property so it can be used in post-processing.
187+
$this->mergeData($scopeData = $this->loadDefaultScopeData($scopeType));
188+
//Only post-processing the data we know is raw.
161189
$scopeData = $this->postProcessor->process($scopeData);
162-
$this->data = array_replace_recursive($this->data, $scopeData);
190+
$this->mergeData($scopeData);
163191
}
164192

165193
return $this->getDataByPathParts($this->data[$scopeType], $pathParts);
@@ -169,9 +197,11 @@ private function getWithParts($path)
169197

170198
if (!isset($this->data[$scopeType][$scopeId])) {
171199
$scopeData = $this->loadScopeData($scopeType, $scopeId);
172-
$this->data = array_replace_recursive($this->data, $scopeData);
200+
//Adding unprocessed data to the data property so it can be used in post-processing.
201+
$this->mergeData($scopeData);
202+
//Only post-processing the data we know is raw.
173203
$scopeData = $this->postProcessor->process($scopeData);
174-
$this->data = array_replace_recursive($this->data, $scopeData);
204+
$this->mergeData($scopeData);
175205
}
176206

177207
return isset($this->data[$scopeType][$scopeId])

app/code/Magento/Integration/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<label>Maximum Login Failures to Lock Out Account</label>
5555
<comment>Maximum Number of authentication failures to lock out account.</comment>
5656
</field>
57-
<field id="timeout" translate="label" type="text comment" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
57+
<field id="timeout" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
5858
<label>Lockout Time (seconds)</label>
5959
<comment>Period of time in seconds after which account will be unlocked.</comment>
6060
</field>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"require-dev": {
8585
"friendsofphp/php-cs-fixer": "~2.13.0",
8686
"lusitanian/oauth": "~0.8.10",
87-
"magento/magento2-functional-testing-framework": "2.3.6",
87+
"magento/magento2-functional-testing-framework": "2.3.9",
8888
"pdepend/pdepend": "2.5.2",
8989
"phpmd/phpmd": "@stable",
9090
"phpunit/phpunit": "~6.5.0",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-->
88
<mapping strict="0">
99
<fields>
10-
<qty />
1110
<checkbox>
1211
<selector>div[contains(@class,"field choice") and label[contains(.,"%product_name%")]]//input</selector>
1312
<strategy>xpath</strategy>

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-->
88
<mapping strict="0">
99
<fields>
10-
<qty />
1110
<attribute>
1211
<selector>//div[@class="product-options"]//label[.="%s"]//following-sibling::*//select</selector>
1312
<strategy>xpath</strategy>

dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-->
88
<mapping strict="0">
99
<fields>
10-
<qty />
1110
<link>
1211
<selector>//*[@id="downloadable-links-list"]/*[contains(.,"%link_name%")]//input</selector>
1312
<strategy>xpath</strategy>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
9+
namespace Magento\Integration\Block\Adminhtml\System\Config;
10+
11+
class OauthSectionTest extends \Magento\TestFramework\TestCase\AbstractBackendController
12+
{
13+
/**
14+
* Checks that OAuth Section in the system config is loaded
15+
*/
16+
public function testOAuthSection()
17+
{
18+
$this->dispatch('backend/admin/system_config/edit/section/oauth/');
19+
$body = $this->getResponse()->getBody();
20+
$this->assertContains('id="oauth_access_token_lifetime-head"', $body);
21+
$this->assertContains('id="oauth_cleanup-head"', $body);
22+
$this->assertContains('id="oauth_consumer-head"', $body);
23+
$this->assertContains('id="oauth_authentication_lock-head"', $body);
24+
}
25+
}

lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define([
3030

3131
_.bindAll(this, 'openFileBrowser');
3232

33-
config = Object.assign({}, baseConfig, config || {});
33+
config = _.extend({}, baseConfig, config || {});
3434
this.wysiwygInstance = new WysiwygInstancePrototype(htmlId, config);
3535
this.wysiwygInstance.eventBus = this.eventBus = new window.varienEvents();
3636
},

0 commit comments

Comments
 (0)