Skip to content

Commit 00f8cfe

Browse files
committed
Merge branch '2.2-develop' into ENGCOM-2911-magento-magento2-17889
2 parents 2f42118 + c9d1bec commit 00f8cfe

File tree

561 files changed

+9155
-7882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

561 files changed

+9155
-7882
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,8 @@ Magento is thankful for any contribution that can improve our code base, documen
4141
</a>
4242

4343
<h3>Labels applied by the Magento team</h3>
44-
45-
| Label | Description |
46-
| ------------- |-------------|
47-
| ![DOC](http://devdocs.magento.com/common/images/github_DOC.png) | Affects Documentation domain. |
48-
| ![PROD](http://devdocs.magento.com/common/images/github_PROD.png) | Affects the Product team (mostly feature requests or business logic change). |
49-
| ![TECH](http://devdocs.magento.com/common/images/github_TECH.png) | Affects Architect Group (mostly to make decisions around technology changes). |
50-
| ![accept](http://devdocs.magento.com/common/images/github_accept.png) | The pull request has been accepted and will be merged into mainline code. |
51-
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
52-
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
53-
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
54-
| ![in progress](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
55-
| ![needs update](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
56-
57-
To learn more about issue gate labels click [here](https://github.com/magento/magento2/wiki/Magento-Issue-Gates)
44+
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
45+
Please review the <a href="https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
5846

5947
<h2>Reporting security issues</h2>
6048

app/code/Magento/AdminNotification/Test/Mftf/composer.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

app/code/Magento/AdvancedPricingImportExport/Test/Mftf/composer.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Analytics/ReportXml/DB/SelectBuilder.php

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ public function getJoins()
8787
* Set joins conditions
8888
*
8989
* @param array $joins
90-
* @return void
90+
* @return $this
9191
*/
9292
public function setJoins($joins)
9393
{
9494
$this->joins = $joins;
95+
96+
return $this;
9597
}
9698

9799
/**
@@ -108,11 +110,13 @@ public function getConnectionName()
108110
* Set connection name
109111
*
110112
* @param string $connectionName
111-
* @return void
113+
* @return $this
112114
*/
113115
public function setConnectionName($connectionName)
114116
{
115117
$this->connectionName = $connectionName;
118+
119+
return $this;
116120
}
117121

118122
/**
@@ -129,11 +133,13 @@ public function getColumns()
129133
* Set columns
130134
*
131135
* @param array $columns
132-
* @return void
136+
* @return $this
133137
*/
134138
public function setColumns($columns)
135139
{
136140
$this->columns = $columns;
141+
142+
return $this;
137143
}
138144

139145
/**
@@ -150,11 +156,13 @@ public function getFilters()
150156
* Set filters
151157
*
152158
* @param array $filters
153-
* @return void
159+
* @return $this
154160
*/
155161
public function setFilters($filters)
156162
{
157163
$this->filters = $filters;
164+
165+
return $this;
158166
}
159167

160168
/**
@@ -171,11 +179,13 @@ public function getFrom()
171179
* Set from condition
172180
*
173181
* @param array $from
174-
* @return void
182+
* @return $this
175183
*/
176184
public function setFrom($from)
177185
{
178186
$this->from = $from;
187+
188+
return $this;
179189
}
180190

181191
/**
@@ -238,11 +248,13 @@ public function getGroup()
238248
* Set group
239249
*
240250
* @param array $group
241-
* @return void
251+
* @return $this
242252
*/
243253
public function setGroup($group)
244254
{
245255
$this->group = $group;
256+
257+
return $this;
246258
}
247259

248260
/**
@@ -259,11 +271,13 @@ public function getParams()
259271
* Set parameters
260272
*
261273
* @param array $params
262-
* @return void
274+
* @return $this
263275
*/
264276
public function setParams($params)
265277
{
266278
$this->params = $params;
279+
280+
return $this;
267281
}
268282

269283
/**
@@ -280,10 +294,12 @@ public function getHaving()
280294
* Set having condition
281295
*
282296
* @param array $having
283-
* @return void
297+
* @return $this
284298
*/
285299
public function setHaving($having)
286300
{
287301
$this->having = $having;
302+
303+
return $this;
288304
}
289305
}

app/code/Magento/Analytics/Test/Mftf/composer.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

app/code/Magento/Analytics/Test/Unit/ReportXml/DB/SelectBuilderTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public function testCreate()
6767
['link-type' => 'right', 'table' => 'attribute', 'condition' => 'neq'],
6868
];
6969
$groups = ['id', 'name'];
70-
$this->selectBuilder->setConnectionName($connectionName);
71-
$this->selectBuilder->setFrom($from);
72-
$this->selectBuilder->setColumns($columns);
73-
$this->selectBuilder->setFilters([$filter]);
74-
$this->selectBuilder->setJoins($joins);
75-
$this->selectBuilder->setGroup($groups);
70+
$this->selectBuilder->setConnectionName($connectionName)
71+
->setFrom($from)
72+
->setColumns($columns)
73+
->setFilters([$filter])
74+
->setJoins($joins)
75+
->setGroup($groups);
7676
$this->resourceConnectionMock->expects($this->once())
7777
->method('getConnection')
7878
->with($connectionName)

app/code/Magento/Authorization/Test/Mftf/composer.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Authorizenet/Test/Mftf/composer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/code/Magento/Backend/Block/Menu.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,23 @@ class Menu extends \Magento\Backend\Block\Template
7676
*/
7777
private $anchorRenderer;
7878

79+
/**
80+
* @var ConfigInterface
81+
*/
82+
private $routeConfig;
83+
7984
/**
8085
* @param Template\Context $context
8186
* @param \Magento\Backend\Model\UrlInterface $url
8287
* @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory
8388
* @param \Magento\Backend\Model\Auth\Session $authSession
8489
* @param \Magento\Backend\Model\Menu\Config $menuConfig
8590
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
91+
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
8692
* @param array $data
8793
* @param MenuItemChecker|null $menuItemChecker
8894
* @param AnchorRenderer|null $anchorRenderer
95+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8996
*/
9097
public function __construct(
9198
\Magento\Backend\Block\Template\Context $context,
@@ -96,7 +103,8 @@ public function __construct(
96103
\Magento\Framework\Locale\ResolverInterface $localeResolver,
97104
array $data = [],
98105
MenuItemChecker $menuItemChecker = null,
99-
AnchorRenderer $anchorRenderer = null
106+
AnchorRenderer $anchorRenderer = null,
107+
\Magento\Framework\App\Route\ConfigInterface $routeConfig = null
100108
) {
101109
$this->_url = $url;
102110
$this->_iteratorFactory = $iteratorFactory;
@@ -105,6 +113,9 @@ public function __construct(
105113
$this->_localeResolver = $localeResolver;
106114
$this->menuItemChecker = $menuItemChecker;
107115
$this->anchorRenderer = $anchorRenderer;
116+
$this->routeConfig = $routeConfig ?:
117+
\Magento\Framework\App\ObjectManager::getInstance()
118+
->get(\Magento\Framework\App\Route\ConfigInterface::class);
108119
parent::__construct($context, $data);
109120
}
110121

@@ -203,8 +214,9 @@ protected function _afterToHtml($html)
203214
*/
204215
protected function _callbackSecretKey($match)
205216
{
217+
$routeId = $this->routeConfig->getRouteByFrontName($match[1]);
206218
return \Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME . '/' . $this->_url->getSecretKey(
207-
$match[1],
219+
$routeId,
208220
$match[2],
209221
$match[3]
210222
);

app/code/Magento/Backend/Block/Widget/Button/ButtonList.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ public function getItems()
127127
*/
128128
public function sortButtons(Item $itemA, Item $itemB)
129129
{
130-
$sortOrderA = intval($itemA->getSortOrder());
131-
$sortOrderB = intval($itemB->getSortOrder());
132-
133-
if ($sortOrderA == $sortOrderB) {
134-
return 0;
135-
}
136-
return ($sortOrderA < $sortOrderB) ? -1 : 1;
130+
return (int)$itemA->getSortOrder() <=> (int)$itemB->getSortOrder();
137131
}
138132
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function add(Item $item, $parentId = null, $index = null)
8383
}
8484
$parentItem->getChildren()->add($item, null, $index);
8585
} else {
86-
$index = intval($index);
86+
$index = (int)$index;
8787
if (!isset($this[$index])) {
8888
$this->offsetSet($index, $item);
8989
$this->_logger->info(
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="NavigateToConfigurationGeneralPage">
11+
<amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToConfigGeneralPage"/>
12+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
13+
</actionGroup>
14+
15+
<actionGroup name="SelectTopDestinationsCountry">
16+
<arguments>
17+
<argument name="countries"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigurationGeneralSectionPage.url('#general_country-link')}}" stepKey="goToConfigurationSectionPage"/>
20+
<selectOption selector="{{AdminConfigurationGeneralSectionCountryOptionsGroupSection.topDestinations}}" parameterArray="[{{countries.country}}]" stepKey="selectTopDestinationsCountry"/>
21+
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfiguration"/>
22+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
23+
</actionGroup>
24+
25+
<actionGroup name="UnSelectTopDestinationsCountry">
26+
<arguments>
27+
<argument name="countries"/>
28+
</arguments>
29+
<amOnPage url="{{AdminConfigurationGeneralSectionPage.url('#general_country-link')}}" stepKey="goToConfigurationSectionPage"/>
30+
<unselectOption selector="{{AdminConfigurationGeneralSectionCountryOptionsGroupSection.topDestinations}}" parameterArray="[{{countries.country}}]" stepKey="unSelectTopDestinationsCountry"/>
31+
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfiguration"/>
32+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
33+
</actionGroup>
34+
</actionGroups>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<pages xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8+
<page name="AdminConfigurationGeneralSectionPage" url="admin/system_config/edit/section/general/{{group_anchor}}" parameterized="true" area="admin" module="Magento_Config">
9+
<section name="AdminConfigurationGeneralSectionCountryOptionsGroupSection"/>
10+
</page>
11+
</pages>

0 commit comments

Comments
 (0)