Skip to content

Commit 8c9e245

Browse files
author
Oleksii Korshenko
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #12730: 12713 (by @EfremovaVI) - #12743: #9453 - ported down c2e5d77 (by @strell) - #12747: #9720 Menu item dependencies (dependsOnModule, depend… (by @hannassy) - #12786: Fix typo in SINGLE_PRODUCT_LAYOUT_HANLDE (by @aschrammel) - #12767: #12699: Multiselect Attribute is not saved (by @awarche) Fixed GitHub Issues: - #12713: Currency symbol overlaps entered attribute option's price while creating Configurable Product (reported by @alena-marchenko) has been fixed in #12730 by @EfremovaVI in 2.2-develop branch Related commits: 1. 370e526 2. 5e43f84 3. ff7029f - #9453: Reopened: '?SID' in URL even if disabled (reported by @hostep) has been fixed in #12743 by @strell in 2.2-develop branch Related commits: 1. 38720ea - #9720: Menu item dependencies (dependsOnModule, dependsOnConfig) are broken (reported by @mam08ixo) has been fixed in #12747 by @hannassy in 2.2-develop branch Related commits: 1. ddf6c9f
2 parents b0babda + 39d60f3 commit 8c9e245

File tree

15 files changed

+276
-169
lines changed

15 files changed

+276
-169
lines changed

app/code/Magento/Backend/Model/Menu/Item.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,15 +467,15 @@ public function toArray()
467467
{
468468
return [
469469
'parent_id' => $this->_parentId,
470-
'module_name' => $this->_moduleName,
470+
'module' => $this->_moduleName,
471471
'sort_index' => $this->_sortIndex,
472-
'depends_on_config' => $this->_dependsOnConfig,
472+
'dependsOnConfig' => $this->_dependsOnConfig,
473473
'id' => $this->_id,
474474
'resource' => $this->_resource,
475475
'path' => $this->_path,
476476
'action' => $this->_action,
477-
'depends_on_module' => $this->_dependsOnModule,
478-
'tooltip' => $this->_tooltip,
477+
'dependsOnModule' => $this->_dependsOnModule,
478+
'toolTip' => $this->_tooltip,
479479
'title' => $this->_title,
480480
'target' => $this->target,
481481
'sub_menu' => isset($this->_submenu) ? $this->_submenu->toArray() : null
@@ -492,15 +492,15 @@ public function toArray()
492492
public function populateFromArray(array $data)
493493
{
494494
$this->_parentId = $this->_getArgument($data, 'parent_id');
495-
$this->_moduleName = $this->_getArgument($data, 'module_name', 'Magento_Backend');
495+
$this->_moduleName = $this->_getArgument($data, 'module', 'Magento_Backend');
496496
$this->_sortIndex = $this->_getArgument($data, 'sort_index');
497-
$this->_dependsOnConfig = $this->_getArgument($data, 'depends_on_config');
497+
$this->_dependsOnConfig = $this->_getArgument($data, 'dependsOnConfig');
498498
$this->_id = $this->_getArgument($data, 'id');
499499
$this->_resource = $this->_getArgument($data, 'resource');
500500
$this->_path = $this->_getArgument($data, 'path', '');
501501
$this->_action = $this->_getArgument($data, 'action');
502-
$this->_dependsOnModule = $this->_getArgument($data, 'depends_on_module');
503-
$this->_tooltip = $this->_getArgument($data, 'tooltip', '');
502+
$this->_dependsOnModule = $this->_getArgument($data, 'dependsOnModule');
503+
$this->_tooltip = $this->_getArgument($data, 'toolTip');
504504
$this->_title = $this->_getArgument($data, 'title');
505505
$this->target = $this->_getArgument($data, 'target');
506506
if (isset($data['sub_menu'])) {

app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ class ItemTest extends \PHPUnit\Framework\TestCase
5656
'title' => 'Item Title',
5757
'action' => '/system/config',
5858
'resource' => 'Magento_Config::config',
59-
'depends_on_module' => 'Magento_Backend',
60-
'depends_on_config' => 'system/config/isEnabled',
61-
'tooltip' => 'Item tooltip',
59+
'dependsOnModule' => 'Magento_Backend',
60+
'dependsOnConfig' => 'system/config/isEnabled',
61+
'toolTip' => 'Item tooltip',
6262
];
6363

6464
protected function setUp()

app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
'title' => 'Item Title',
1313
'action' => '/system/config',
1414
'resource' => 'Magento_Config::config',
15-
'depends_on_module' => 'Magento_Backend',
16-
'depends_on_config' => 'system/config/isEnabled',
17-
'tooltip' => 'Item tooltip',
15+
'dependsOnModule' => 'Magento_Backend',
16+
'dependsOnConfig' => 'system/config/isEnabled',
17+
'toolTip' => 'Item tooltip',
1818
],
1919
[
2020
'parent_id' => null,
21-
'module_name' => 'Magento_Backend',
21+
'module' => 'Magento_Backend',
2222
'sort_index' => null,
23-
'depends_on_config' => 'system/config/isEnabled',
23+
'dependsOnConfig' => 'system/config/isEnabled',
2424
'id' => 'item',
2525
'resource' => 'Magento_Config::config',
2626
'path' => '',
2727
'action' => '/system/config',
28-
'depends_on_module' => 'Magento_Backend',
29-
'tooltip' => 'Item tooltip',
28+
'dependsOnModule' => 'Magento_Backend',
29+
'toolTip' => 'Item tooltip',
3030
'title' => 'Item Title',
3131
'sub_menu' => null,
3232
'target' => null
@@ -38,43 +38,43 @@
3838
'title' => 'Item Title',
3939
'action' => '/system/config',
4040
'resource' => 'Magento_Config::config',
41-
'depends_on_module' => 'Magento_Backend',
42-
'depends_on_config' => 'system/config/isEnabled',
43-
'tooltip' => 'Item tooltip',
41+
'dependsOnModule' => 'Magento_Backend',
42+
'dependsOnConfig' => 'system/config/isEnabled',
43+
'toolTip' => 'Item tooltip',
4444
],
4545
[
4646
'parent_id' => '1',
47-
'module_name' => 'Magento_Module1',
47+
'module' => 'Magento_Module1',
4848
'sort_index' => '50',
49-
'depends_on_config' => null,
49+
'dependsOnConfig' => null,
5050
'id' => '5',
5151
'resource' => null,
5252
'path' => null,
5353
'action' => null,
54-
'depends_on_module' => null,
55-
'tooltip' => null,
54+
'dependsOnModule' => null,
55+
'toolTip' => null,
5656
'title' => null,
5757
'sub_menu' => [
5858
'id' => 'item',
5959
'title' => 'Item Title',
6060
'action' => '/system/config',
6161
'resource' => 'Magento_Config::config',
62-
'depends_on_module' => 'Magento_Backend',
63-
'depends_on_config' => 'system/config/isEnabled',
64-
'tooltip' => 'Item tooltip',
62+
'dependsOnModule' => 'Magento_Backend',
63+
'dependsOnConfig' => 'system/config/isEnabled',
64+
'toolTip' => 'Item tooltip',
6565
],
6666
],
6767
[
6868
'parent_id' => '1',
69-
'module_name' => 'Magento_Module1',
69+
'module' => 'Magento_Module1',
7070
'sort_index' => '50',
71-
'depends_on_config' => null,
71+
'dependsOnConfig' => null,
7272
'id' => '5',
7373
'resource' => null,
7474
'path' => '',
7575
'action' => null,
76-
'depends_on_module' => null,
77-
'tooltip' => '',
76+
'dependsOnModule' => null,
77+
'toolTip' => '',
7878
'title' => null,
7979
'sub_menu' => ['submenuArray'],
8080
'target' => null
@@ -83,51 +83,51 @@
8383
'data with submenu to constructor' => [
8484
[
8585
'parent_id' => '1',
86-
'module_name' => 'Magento_Module1',
86+
'module' => 'Magento_Module1',
8787
'sort_index' => '50',
88-
'depends_on_config' => null,
88+
'dependsOnConfig' => null,
8989
'id' => '5',
9090
'resource' => null,
9191
'path' => null,
9292
'action' => null,
93-
'depends_on_module' => null,
94-
'tooltip' => null,
93+
'dependsOnModule' => null,
94+
'toolTip' => null,
9595
'title' => null,
9696
'sub_menu' => [
9797
'id' => 'item',
9898
'title' => 'Item Title',
9999
'action' => '/system/config',
100100
'resource' => 'Magento_Config::config',
101-
'depends_on_module' => 'Magento_Backend',
102-
'depends_on_config' => 'system/config/isEnabled',
103-
'tooltip' => 'Item tooltip',
101+
'dependsOnModule' => 'Magento_Backend',
102+
'dependsOnConfig' => 'system/config/isEnabled',
103+
'toolTip' => 'Item tooltip',
104104
],
105105
],
106106
[
107107
'parent_id' => '1',
108-
'module_name' => 'Magento_Module1',
108+
'module' => 'Magento_Module1',
109109
'sort_index' => '50',
110110
'sub_menu' => [
111111
'id' => 'item',
112112
'title' => 'Item Title',
113113
'action' => '/system/config',
114114
'resource' => 'Magento_Config::config',
115-
'depends_on_module' => 'Magento_Backend',
116-
'depends_on_config' => 'system/config/isEnabled',
117-
'tooltip' => 'Item tooltip',
115+
'dependsOnModule' => 'Magento_Backend',
116+
'dependsOnConfig' => 'system/config/isEnabled',
117+
'toolTip' => 'Item tooltip',
118118
],
119119
],
120120
[
121121
'parent_id' => '1',
122-
'module_name' => 'Magento_Module1',
122+
'module' => 'Magento_Module1',
123123
'sort_index' => '50',
124-
'depends_on_config' => null,
124+
'dependsOnConfig' => null,
125125
'id' => null,
126126
'resource' => null,
127127
'path' => '',
128128
'action' => null,
129-
'depends_on_module' => null,
130-
'tooltip' => '',
129+
'dependsOnModule' => null,
130+
'toolTip' => '',
131131
'title' => null,
132132
'sub_menu' => ['submenuArray'],
133133
'target' => null

app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
'title' => 'Item Title',
1212
'action' => '/system/config',
1313
'resource' => 'Magento_Config::config',
14-
'depends_on_module' => 'Magento_Backend',
15-
'depends_on_config' => 'system/config/isEnabled',
16-
'tooltip' => 'Item tooltip',
14+
'dependsOnModule' => 'Magento_Backend',
15+
'dependsOnConfig' => 'system/config/isEnabled',
16+
'toolTip' => 'Item tooltip',
1717
'sub_menu' => null,
1818
],
1919
[
2020
'parent_id' => null,
21-
'module_name' => 'Magento_Backend',
21+
'module' => 'Magento_Backend',
2222
'sort_index' => null,
23-
'depends_on_config' => 'system/config/isEnabled',
23+
'dependsOnConfig' => 'system/config/isEnabled',
2424
'id' => 'item',
2525
'resource' => 'Magento_Config::config',
2626
'path' => '',
2727
'action' => '/system/config',
28-
'depends_on_module' => 'Magento_Backend',
29-
'tooltip' => 'Item tooltip',
28+
'dependsOnModule' => 'Magento_Backend',
29+
'toolTip' => 'Item tooltip',
3030
'title' => 'Item Title',
3131
'sub_menu' => null,
3232
'target' => null
@@ -35,85 +35,85 @@
3535
'with submenu' => [
3636
[
3737
'parent_id' => '1',
38-
'module_name' => 'Magento_Module1',
38+
'module' => 'Magento_Module1',
3939
'sort_index' => '50',
40-
'depends_on_config' => null,
40+
'dependsOnConfig' => null,
4141
'id' => '5',
4242
'resource' => null,
4343
'path' => null,
4444
'action' => null,
45-
'depends_on_module' => null,
46-
'tooltip' => null,
45+
'dependsOnModule' => null,
46+
'toolTip' => null,
4747
'title' => null,
4848
'sub_menu' => [
4949
'id' => 'item',
5050
'title' => 'Item Title',
5151
'action' => '/system/config',
5252
'resource' => 'Magento_Config::config',
53-
'depends_on_module' => 'Magento_Backend',
54-
'depends_on_config' => 'system/config/isEnabled',
55-
'tooltip' => 'Item tooltip',
53+
'dependsOnModule' => 'Magento_Backend',
54+
'dependsOnConfig' => 'system/config/isEnabled',
55+
'toolTip' => 'Item tooltip',
5656
],
5757
],
5858
[
5959
'parent_id' => '1',
60-
'module_name' => 'Magento_Module1',
60+
'module' => 'Magento_Module1',
6161
'sort_index' => '50',
62-
'depends_on_config' => null,
62+
'dependsOnConfig' => null,
6363
'id' => '5',
6464
'resource' => null,
6565
'path' => null,
6666
'action' => null,
67-
'depends_on_module' => null,
68-
'tooltip' => '',
67+
'dependsOnModule' => null,
68+
'toolTip' => '',
6969
'title' => null,
7070
'sub_menu' => [
7171
'id' => 'item',
7272
'title' => 'Item Title',
7373
'action' => '/system/config',
7474
'resource' => 'Magento_Config::config',
75-
'depends_on_module' => 'Magento_Backend',
76-
'depends_on_config' => 'system/config/isEnabled',
77-
'tooltip' => 'Item tooltip',
75+
'dependsOnModule' => 'Magento_Backend',
76+
'dependsOnConfig' => 'system/config/isEnabled',
77+
'toolTip' => 'Item tooltip',
7878
],
7979
'target' => null
8080
]
8181
],
8282
'small set of data' => [
8383
[
8484
'parent_id' => '1',
85-
'module_name' => 'Magento_Module1',
85+
'module' => 'Magento_Module1',
8686
'sort_index' => '50',
8787
'sub_menu' => [
8888
'id' => 'item',
8989
'title' => 'Item Title',
9090
'action' => '/system/config',
9191
'resource' => 'Magento_Config::config',
92-
'depends_on_module' => 'Magento_Backend',
93-
'depends_on_config' => 'system/config/isEnabled',
94-
'tooltip' => 'Item tooltip',
92+
'dependsOnModule' => 'Magento_Backend',
93+
'dependsOnConfig' => 'system/config/isEnabled',
94+
'toolTip' => 'Item tooltip',
9595
],
9696
],
9797
[
9898
'parent_id' => '1',
99-
'module_name' => 'Magento_Module1',
99+
'module' => 'Magento_Module1',
100100
'sort_index' => '50',
101-
'depends_on_config' => null,
101+
'dependsOnConfig' => null,
102102
'id' => null,
103103
'resource' => null,
104104
'path' => '',
105105
'action' => null,
106-
'depends_on_module' => null,
107-
'tooltip' => '',
106+
'dependsOnModule' => null,
107+
'toolTip' => '',
108108
'title' => null,
109109
'sub_menu' => [
110110
'id' => 'item',
111111
'title' => 'Item Title',
112112
'action' => '/system/config',
113113
'resource' => 'Magento_Config::config',
114-
'depends_on_module' => 'Magento_Backend',
115-
'depends_on_config' => 'system/config/isEnabled',
116-
'tooltip' => 'Item tooltip',
114+
'dependsOnModule' => 'Magento_Backend',
115+
'dependsOnConfig' => 'system/config/isEnabled',
116+
'toolTip' => 'Item tooltip',
117117
],
118118
'target' => null
119119
]

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/AbstractTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ public function testWalkAttributes()
4444

4545
$code = 'test_attr';
4646
$set = 10;
47+
$storeId = 100;
4748

4849
$object = $this->createPartialMock(\Magento\Catalog\Model\Product::class, ['__wakeup']);
4950

5051
$object->setData('test_attr', 'test_attr');
5152
$object->setData('attribute_set_id', $set);
53+
$object->setData('store_id', $storeId);
5254

5355
$entityType = new \Magento\Framework\DataObject();
5456
$entityType->setEntityTypeCode('test');

0 commit comments

Comments
 (0)