Skip to content

Commit aaa5528

Browse files
author
Stanislav Idolov
authored
Merge branch '2.2-develop' into issue/9830
2 parents 9316bd0 + 5e7bc50 commit aaa5528

File tree

439 files changed

+6864
-8479
lines changed

Some content is hidden

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

439 files changed

+6864
-8479
lines changed

CHANGELOG.md

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

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/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"lib-libxml": "*"
1212
},
1313
"type": "magento2-module",
14-
"version": "100.2.3",
14+
"version": "100.2.4",
1515
"license": [
1616
"OSL-3.0",
1717
"AFL-3.0"

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/framework": "101.0.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.2.3",
16+
"version": "100.2.4",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

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/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/Analytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"magento/framework": "101.0.*"
1111
},
1212
"type": "magento2-module",
13-
"version": "100.2.2",
13+
"version": "100.2.3",
1414
"license": [
1515
"OSL-3.0",
1616
"AFL-3.0"

app/code/Magento/Authorization/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"magento/framework": "101.0.*"
88
},
99
"type": "magento2-module",
10-
"version": "100.2.1",
10+
"version": "100.2.2",
1111
"license": [
1212
"OSL-3.0",
1313
"AFL-3.0"

app/code/Magento/Authorizenet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"magento/module-config": "101.0.*"
1717
},
1818
"type": "magento2-module",
19-
"version": "100.2.1",
19+
"version": "100.2.2",
2020
"license": [
2121
"proprietary"
2222
],

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public function getItems()
127127
*/
128128
public function sortButtons(Item $itemA, Item $itemB)
129129
{
130-
$sortOrderA = intval($itemA->getSortOrder());
131-
$sortOrderB = intval($itemB->getSortOrder());
130+
$sortOrderA = (int) $itemA->getSortOrder();
131+
$sortOrderB = (int) $itemB->getSortOrder();
132132

133133
if ($sortOrderA == $sortOrderB) {
134134
return 0;

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteGroupPost.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,28 @@
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

99
use Magento\Framework\Controller\ResultFactory;
10+
use Magento\Framework\App\Request\Http as HttpRequest;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteGroupPost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws NotFoundException
1518
*/
1619
public function execute()
1720
{
18-
$itemId = $this->getRequest()->getParam('item_id');
19-
21+
/** @var HttpRequest $request */
22+
$request = $this->getRequest();
2023
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
21-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
24+
$redirectResult = $this->resultFactory->create(
25+
ResultFactory::TYPE_REDIRECT
26+
);
27+
if (!$request->isPost()) {
28+
throw new NotFoundException(__('Page not found.'));
29+
}
2230

31+
$itemId = $request->getParam('item_id');
2332
if (!($model = $this->_objectManager->create(\Magento\Store\Model\Group::class)->load($itemId))) {
2433
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2534
return $redirectResult->setPath('adminhtml/*/');

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteStorePost.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,31 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

9+
use Magento\Framework\App\Request\Http as HttpRequest;
910
use Magento\Framework\Controller\ResultFactory;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteStorePost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* Delete store view post action
1517
*
1618
* @return \Magento\Backend\Model\View\Result\Redirect
19+
* @throws NotFoundException
1720
*/
1821
public function execute()
1922
{
20-
$itemId = $this->getRequest()->getParam('item_id');
21-
23+
/** @var HttpRequest $request */
24+
$request = $this->getRequest();
2225
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
23-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
26+
$redirectResult = $this->resultFactory->create(
27+
ResultFactory::TYPE_REDIRECT
28+
);
29+
if (!$request->isPost()) {
30+
throw new NotFoundException(__('Page not found.'));
31+
}
32+
33+
$itemId = $request->getParam('item_id');
2434
if (!($model = $this->_objectManager->create(\Magento\Store\Model\Store::class)->load($itemId))) {
2535
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2636
return $redirectResult->setPath('adminhtml/*/');

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteWebsitePost.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@
77
namespace Magento\Backend\Controller\Adminhtml\System\Store;
88

99
use Magento\Framework\Controller\ResultFactory;
10+
use Magento\Framework\App\Request\Http as HttpRequest;
11+
use Magento\Framework\Exception\NotFoundException;
1012

1113
class DeleteWebsitePost extends \Magento\Backend\Controller\Adminhtml\System\Store
1214
{
1315
/**
1416
* @return \Magento\Backend\Model\View\Result\Redirect
17+
* @throws NotFoundException
1518
*/
1619
public function execute()
1720
{
18-
$itemId = $this->getRequest()->getParam('item_id');
19-
$model = $this->_objectManager->create(\Magento\Store\Model\Website::class);
20-
$model->load($itemId);
21-
21+
/** @var HttpRequest $request */
22+
$request = $this->getRequest();
2223
/** @var \Magento\Backend\Model\View\Result\Redirect $redirectResult */
23-
$redirectResult = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
24+
$redirectResult = $this->resultFactory->create(
25+
ResultFactory::TYPE_REDIRECT
26+
);
27+
if (!$request->isPost()) {
28+
throw new NotFoundException(__('Page not found.'));
29+
}
2430

31+
$itemId = $request->getParam('item_id');
32+
$model = $this->_objectManager->create(\Magento\Store\Model\Website::class);
33+
$model->load($itemId);
2534
if (!$model) {
2635
$this->messageManager->addErrorMessage(__('Something went wrong. Please try again.'));
2736
return $redirectResult->setPath('adminhtml/*/');

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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="AdminDashboardPage" url="admin/dashboard/" area="admin" module="Magento_Backend">
12+
<section name="AdminMenuSection"/>
13+
</page>
14+
</pages>

0 commit comments

Comments
 (0)