Skip to content

Commit 1a0cae2

Browse files
Merge pull request #2 from magento/2.3-develop
2.3 develop
2 parents df50692 + 9ed7081 commit 1a0cae2

File tree

639 files changed

+7238
-2672
lines changed

Some content is hidden

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

639 files changed

+7238
-2672
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ install: composer install --no-interaction
5252
before_script: ./dev/travis/before_script.sh
5353
script:
5454
# Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails
55-
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
5655
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
5756

5857
# The scripts for grunt/phpunit type tests

app/code/Magento/AdminNotification/composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{
22
"name": "magento/module-admin-notification",
33
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
47
"require": {
58
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
6-
"magento/module-store": "100.3.*",
9+
"lib-libxml": "*",
10+
"magento/framework": "100.3.*",
711
"magento/module-backend": "100.3.*",
812
"magento/module-media-storage": "100.3.*",
9-
"magento/framework": "100.3.*",
10-
"magento/module-ui": "100.3.*",
11-
"lib-libxml": "*"
13+
"magento/module-store": "100.3.*",
14+
"magento/module-ui": "100.3.*"
1215
},
1316
"type": "magento2-module",
1417
"version": "100.3.0-dev",

app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
<arguments>
2121
<argument name="filter_visibility" xsi:type="string">0</argument>
2222
</arguments>
23-
<block class="Magento\Backend\Block\Widget\Grid\Column" as="severity">
23+
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.notification.container.grid.columnSet.severity" as="severity">
2424
<arguments>
2525
<argument name="header" xsi:type="string" translate="true">Severity</argument>
2626
<argument name="index" xsi:type="string">severity</argument>
2727
<argument name="renderer" xsi:type="string">Magento\AdminNotification\Block\Grid\Renderer\Severity</argument>
2828
</arguments>
2929
</block>
30-
<block class="Magento\Backend\Block\Widget\Grid\Column" as="date_added">
30+
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.notification.container.grid.columnSet.date_added" as="date_added">
3131
<arguments>
3232
<argument name="header" xsi:type="string" translate="true">Date Added</argument>
3333
<argument name="id" xsi:type="string">date_added</argument>
@@ -37,14 +37,14 @@
3737
<argument name="header_css_class" xsi:type="string">col-date</argument>
3838
</arguments>
3939
</block>
40-
<block class="Magento\Backend\Block\Widget\Grid\Column" as="title">
40+
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.notification.container.grid.columnSet.title" as="title">
4141
<arguments>
4242
<argument name="header" xsi:type="string" translate="true">Message</argument>
4343
<argument name="index" xsi:type="string">title</argument>
4444
<argument name="renderer" xsi:type="string">Magento\AdminNotification\Block\Grid\Renderer\Notice</argument>
4545
</arguments>
4646
</block>
47-
<block class="Magento\Backend\Block\Widget\Grid\Column" as="actions">
47+
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.notification.container.grid.columnSet.actions" as="actions">
4848
<arguments>
4949
<argument name="header" xsi:type="string" translate="true">Actions</argument>
5050
<argument name="sortable" xsi:type="string">0</argument>

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "magento/module-advanced-pricing-import-export",
33
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
47
"require": {
58
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
9+
"magento/framework": "100.3.*",
610
"magento/module-catalog": "101.2.*",
11+
"magento/module-catalog-import-export": "100.3.*",
712
"magento/module-catalog-inventory": "100.3.*",
13+
"magento/module-customer": "100.3.*",
814
"magento/module-eav": "100.3.*",
915
"magento/module-import-export": "100.3.*",
10-
"magento/module-catalog-import-export": "100.3.*",
11-
"magento/module-customer": "100.3.*",
12-
"magento/module-store": "100.3.*",
13-
"magento/framework": "100.3.*"
16+
"magento/module-store": "100.3.*"
1417
},
1518
"type": "magento2-module",
1619
"version": "100.3.0-dev",

app/code/Magento/Authorization/composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"name": "magento/module-authorization",
33
"description": "Authorization module provides access to Magento ACL functionality.",
4+
"config": {
5+
"sort-packages": true
6+
},
47
"require": {
58
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
6-
"magento/module-backend": "100.3.*",
7-
"magento/framework": "100.3.*"
9+
"magento/framework": "100.3.*",
10+
"magento/module-backend": "100.3.*"
811
},
912
"type": "magento2-module",
1013
"version": "100.3.0-dev",

app/code/Magento/Authorizenet/composer.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "magento/module-authorizenet",
33
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
47
"require": {
58
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
6-
"magento/module-sales": "100.3.*",
7-
"magento/module-store": "100.3.*",
8-
"magento/module-quote": "100.3.*",
9-
"magento/module-checkout": "100.3.*",
9+
"magento/framework": "100.3.*",
1010
"magento/module-backend": "100.3.*",
11-
"magento/module-payment": "100.3.*",
1211
"magento/module-catalog": "101.2.*",
13-
"magento/framework": "100.3.*"
12+
"magento/module-checkout": "100.3.*",
13+
"magento/module-payment": "100.3.*",
14+
"magento/module-quote": "100.3.*",
15+
"magento/module-sales": "100.3.*",
16+
"magento/module-store": "100.3.*"
1417
},
1518
"suggest": {
1619
"magento/module-config": "100.3.*"

app/code/Magento/Backend/Block/Media/Uploader.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Media;
77

8+
use Magento\Framework\App\ObjectManager;
9+
810
/**
911
* Adminhtml media library uploader
1012
* @api
@@ -27,16 +29,25 @@ class Uploader extends \Magento\Backend\Block\Widget
2729
*/
2830
protected $_fileSizeService;
2931

32+
/**
33+
* @var \Magento\Framework\Json\EncoderInterface
34+
*/
35+
protected $_jsonEncoder;
36+
3037
/**
3138
* @param \Magento\Backend\Block\Template\Context $context
3239
* @param \Magento\Framework\File\Size $fileSize
3340
* @param array $data
41+
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
3442
*/
3543
public function __construct(
3644
\Magento\Backend\Block\Template\Context $context,
3745
\Magento\Framework\File\Size $fileSize,
38-
array $data = []
46+
array $data = [],
47+
\Magento\Framework\Json\EncoderInterface $jsonEncoder = null
3948
) {
49+
$this->_jsonEncoder = $jsonEncoder ?:
50+
ObjectManager::getInstance()->get(\Magento\Framework\Json\EncoderInterface::class);
4051
$this->_fileSizeService = $fileSize;
4152
parent::__construct($context, $data);
4253
}
@@ -107,7 +118,7 @@ public function getJsObjectName()
107118
*/
108119
public function getConfigJson()
109120
{
110-
return $this->_coreData->jsonEncode($this->getConfig()->getData());
121+
return $this->_jsonEncoder->encode($this->getConfig()->getData());
111122
}
112123

113124
/**

app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@ public function execute()
3939
$resultPage->addHandle('adminhtml_noroute');
4040
return $resultPage;
4141
}
42+
43+
/**
44+
* Error page should be public accessible. Do not check keys to avoid redirect loop
45+
*
46+
* @return bool
47+
*/
48+
protected function _validateSecretKey()
49+
{
50+
return true;
51+
}
4252
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Backend\Model\Search;
7+
8+
use Magento\Backend\Model\Search\Config\Result\Builder;
9+
use Magento\Config\Model\Config\Structure;
10+
use Magento\Config\Model\Config\Structure\Element\AbstractComposite;
11+
use Magento\Config\Model\Config\Structure\Element\Iterator as ElementIterator;
12+
13+
/**
14+
* Search Config Model
15+
*/
16+
class Config extends \Magento\Framework\DataObject
17+
{
18+
/**
19+
* @var \Magento\Framework\App\Config\ConfigTypeInterface
20+
*/
21+
private $configStructure;
22+
23+
/**
24+
* @var Builder
25+
*/
26+
private $resultBuilder;
27+
28+
/**
29+
* @param Structure $configStructure
30+
* @param Builder $resultBuilder
31+
*/
32+
public function __construct(Structure $configStructure, Builder $resultBuilder)
33+
{
34+
$this->configStructure = $configStructure;
35+
$this->resultBuilder = $resultBuilder;
36+
}
37+
38+
/**
39+
* @param string $query
40+
* @return $this
41+
*/
42+
public function setQuery($query)
43+
{
44+
$this->setData('query', $query);
45+
return $this;
46+
}
47+
48+
/**
49+
* @return string|null
50+
*/
51+
public function getQuery()
52+
{
53+
return $this->getData('query');
54+
}
55+
56+
/**
57+
* @return bool
58+
*/
59+
public function hasQuery()
60+
{
61+
return $this->hasData('query');
62+
}
63+
64+
/**
65+
* @param array $results
66+
* @return $this
67+
*/
68+
public function setResults(array $results)
69+
{
70+
$this->setData('results', $results);
71+
return $this;
72+
}
73+
74+
/**
75+
* @return array|null
76+
*/
77+
public function getResults()
78+
{
79+
return $this->getData('results');
80+
}
81+
82+
/**
83+
* Load search results
84+
*
85+
* @return $this
86+
*/
87+
public function load()
88+
{
89+
$this->findInStructure($this->configStructure->getTabs(), $this->getQuery());
90+
$this->setResults($this->resultBuilder->getAll());
91+
return $this;
92+
}
93+
94+
/**
95+
* @param ElementIterator $structureElementIterator
96+
* @param string $searchTerm
97+
* @param string $pathLabel
98+
* @return void
99+
* @SuppressWarnings(PHPMD.LongVariable)
100+
*/
101+
private function findInStructure(ElementIterator $structureElementIterator, $searchTerm, $pathLabel = '')
102+
{
103+
if (empty($searchTerm)) {
104+
return;
105+
}
106+
foreach ($structureElementIterator as $structureElement) {
107+
if (mb_stripos((string)$structureElement->getLabel(), $searchTerm) !== false) {
108+
$this->resultBuilder->add($structureElement, $pathLabel);
109+
}
110+
$elementPathLabel = $pathLabel . ' / ' . $structureElement->getLabel();
111+
if ($structureElement instanceof AbstractComposite && $structureElement->hasChildren()) {
112+
$this->findInStructure($structureElement->getChildren(), $searchTerm, $elementPathLabel);
113+
}
114+
}
115+
}
116+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Backend\Model\Search\Config\Result;
7+
8+
use Magento\Backend\Model\Search\Config\Structure\ElementBuilderInterface;
9+
use Magento\Backend\Model\UrlInterface;
10+
use Magento\Config\Model\Config\StructureElementInterface;
11+
12+
/**
13+
* Config SearchResult Builder
14+
* @SuppressWarnings(PHPMD.LongVariable)
15+
*/
16+
class Builder
17+
{
18+
/**
19+
* @var array
20+
*/
21+
private $results = [];
22+
23+
/**
24+
* @var UrlInterface
25+
*/
26+
private $urlBuilder;
27+
28+
/**
29+
* @var ElementBuilderInterface[]
30+
*/
31+
private $structureElementTypes;
32+
33+
/**
34+
* @param UrlInterface $urlBuilder
35+
* @param array $structureElementTypes
36+
*/
37+
public function __construct(UrlInterface $urlBuilder, array $structureElementTypes)
38+
{
39+
$this->urlBuilder = $urlBuilder;
40+
$this->structureElementTypes = $structureElementTypes;
41+
}
42+
43+
/**
44+
* @return array
45+
*/
46+
public function getAll()
47+
{
48+
return $this->results;
49+
}
50+
51+
/**
52+
* @param StructureElementInterface $structureElement
53+
* @param string $elementPathLabel
54+
* @return void
55+
*/
56+
public function add(StructureElementInterface $structureElement, $elementPathLabel)
57+
{
58+
$urlParams = [];
59+
$elementData = $structureElement->getData();
60+
61+
if (!in_array($elementData['_elementType'], array_keys($this->structureElementTypes))) {
62+
return;
63+
}
64+
65+
if (isset($this->structureElementTypes[$elementData['_elementType']])) {
66+
$urlParamsBuilder = $this->structureElementTypes[$elementData['_elementType']];
67+
$urlParams = $urlParamsBuilder->build($structureElement);
68+
}
69+
70+
$this->results[] = [
71+
'id' => $structureElement->getPath(),
72+
'type' => null,
73+
'name' => (string)$structureElement->getLabel(),
74+
'description' => $elementPathLabel,
75+
'url' => $this->urlBuilder->getUrl('*/system_config/edit', $urlParams),
76+
];
77+
}
78+
}

0 commit comments

Comments
 (0)