Skip to content

Commit a2238d9

Browse files
Merge pull request #6865 from magento-cia/cia-2.4.3-2.4-sync-05142021
[cia] MC-41647: SKU Search very slow on Admin Panel
2 parents eb2592d + 9ca2a57 commit a2238d9

File tree

678 files changed

+11888
-114048
lines changed

Some content is hidden

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

678 files changed

+11888
-114048
lines changed

app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
<policy id="script-src">
1212
<values>
1313
<value id="adobedtm" type="host">assets.adobedtm.com</value>
14+
<value id="adobe" type="host">*.adobe.com</value>
15+
</values>
16+
</policy>
17+
<policy id="style-src">
18+
<values>
19+
<value id="adobe" type="host">*.adobe.com</value>
1420
</values>
1521
</policy>
1622
<policy id="img-src">
@@ -19,6 +25,7 @@
1925
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
2026
<value id="dpmdemdex" type="host">dpm.demdex.net</value>
2127
<value id="everesttech" type="host">cm.everesttech.net</value>
28+
<value id="adobe" type="host">*.adobe.com</value>
2229
</values>
2330
</policy>
2431
<policy id="connect-src">
@@ -27,9 +34,15 @@
2734
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
2835
</values>
2936
</policy>
37+
<policy id="media-src">
38+
<values>
39+
<value id="adobe" type="host">*.adobe.com</value>
40+
</values>
41+
</policy>
3042
<policy id="frame-src">
3143
<values>
3244
<value id="amcdemdex" type="host">fast.amc.demdex.net</value>
45+
<value id="adobe" type="host">*.adobe.com</value>
3346
</values>
3447
</policy>
3548
</policies>

app/code/Magento/Backend/Block/Dashboard/Bar.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Backend\Block\Dashboard;
77

8+
use Magento\Directory\Model\Currency;
89
use Magento\Store\Model\Store;
910

1011
/**
@@ -20,10 +21,15 @@ class Bar extends \Magento\Backend\Block\Dashboard\AbstractDashboard
2021
protected $_totals = [];
2122

2223
/**
23-
* @var \Magento\Directory\Model\Currency|null
24+
* @var Currency|null
2425
*/
2526
protected $_currentCurrencyCode = null;
2627

28+
/**
29+
* @var Currency
30+
*/
31+
private $_currency;
32+
2733
/**
2834
* Get totals
2935
*
@@ -67,7 +73,7 @@ public function format($price)
6773
/**
6874
* Setting currency model
6975
*
70-
* @param \Magento\Directory\Model\Currency $currency
76+
* @param Currency $currency
7177
* @return void
7278
*/
7379
public function setCurrency($currency)
@@ -78,7 +84,7 @@ public function setCurrency($currency)
7884
/**
7985
* Retrieve currency model if not set then return currency model for current store
8086
*
81-
* @return \Magento\Directory\Model\Currency
87+
* @return Currency
8288
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
8389
*/
8490
public function getCurrency()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,33 @@
66

77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9+
use Magento\Backend\App\Action\Context;
910
use Magento\Framework\App\Action\HttpPostActionInterface;
11+
use Magento\Framework\Stdlib\DateTime\Filter\Date;
1012
use Magento\Reports\Controller\Adminhtml\Report\Statistics;
13+
use Psr\Log\LoggerInterface;
1114

1215
/**
1316
* Refresh Dashboard statistics action.
1417
*/
1518
class RefreshStatistics extends Statistics implements HttpPostActionInterface
1619
{
1720
/**
18-
* @param \Magento\Backend\App\Action\Context $context
19-
* @param \Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter
21+
* @var LoggerInterface
22+
*/
23+
private $logger;
24+
25+
/**
26+
* @param Context $context
27+
* @param Date $dateFilter
2028
* @param array $reportTypes
21-
* @param \Psr\Log\LoggerInterface $logger
29+
* @param LoggerInterface $logger
2230
*/
2331
public function __construct(
24-
\Magento\Backend\App\Action\Context $context,
25-
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter,
32+
Context $context,
33+
Date $dateFilter,
2634
array $reportTypes,
27-
\Psr\Log\LoggerInterface $logger
35+
LoggerInterface $logger
2836
) {
2937
parent::__construct($context, $dateFilter, $reportTypes);
3038
$this->logger = $logger;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ class Config
6363
*/
6464
protected $_appState;
6565

66+
/**
67+
* @var Builder
68+
*/
69+
private $_menuBuilder;
70+
6671
/**
6772
* @param \Magento\Backend\Model\Menu\Builder $menuBuilder
6873
* @param \Magento\Backend\Model\Menu\AbstractDirector $menuDirector

app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $viewModel = $block->getViewModel();
1919
?>
2020
<div class="dashboard-diagram">
2121
<div class="dashboard-diagram-graph">
22-
<canvas id="chart_<?= $escaper->escapeHtmlAttr($block->getData('html_id')) ?>_period"/>
22+
<canvas id="chart_<?= $escaper->escapeHtmlAttr($block->getData('html_id')) ?>_period"></canvas>
2323
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
2424
'display:none',
2525
'#chart_' . $escaper->escapeJs($block->getData('html_id')) . '_period'

app/code/Magento/Backend/view/adminhtml/web/js/store-switcher.js

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

7070
} else {
7171
$('#preview_selected_store').val(scopeId);
72-
$('#preview_form').submit();
72+
$('#preview_form').trigger('submit');
7373

7474
$('.store-switcher .dropdown-menu li a').each(function () {
7575
var $this = $(this);

app/code/Magento/Backup/Model/Fs/Collection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ class Collection extends \Magento\Framework\Data\Collection\Filesystem
4242
*/
4343
protected $_backup = null;
4444

45+
/**
46+
* @var \Magento\Framework\Filesystem
47+
*/
48+
private $_filesystem;
4549
/**
4650
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
4751
* @param \Magento\Backup\Helper\Data $backupData
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="EnableBackupFunctionality">
12+
<data key="path">system/backup/functionality_enabled</data>
13+
<data key="value">1</data>
14+
</entity>
15+
<entity name="DisableBackupFunctionality">
16+
<!-- Magento default value -->
17+
<data key="path">system/backup/functionality_enabled</data>
18+
<data key="value">0</data>
19+
</entity>
20+
</entities>

app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-94176"/>
1919
<group value="backup"/>
20-
<skip>
21-
<issueId value="MC-5807"/>
22-
</skip>
2320
</annotations>
21+
<before>
22+
<magentoCLI command="config:set {{EnableBackupFunctionality.path}} {{EnableBackupFunctionality.value}}" stepKey="setEnableBackup"/>
23+
</before>
24+
<after>
25+
<magentoCLI command="config:set {{DisableBackupFunctionality.path}} {{DisableBackupFunctionality.value}}" stepKey="setDisableBackup"/>
26+
</after>
2427

2528
<!--Login to admin area-->
2629
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/Bundle/Model/ResourceModel/Indexer/BundleOptionStockDataSelectBuilder.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
*/
1818
class BundleOptionStockDataSelectBuilder
1919
{
20+
/**
21+
* @var \Magento\Framework\App\ResourceConnection
22+
*/
23+
private $resourceConnection;
24+
25+
/**
26+
* @var \Magento\Framework\EntityManager\MetadataPool
27+
*/
28+
private $metadataPool;
29+
2030
/**
2131
* @param \Magento\Framework\App\ResourceConnection $resourceConnection
2232
* @param \Magento\Framework\EntityManager\MetadataPool $metadataPool

app/code/Magento/Bundle/Model/ResourceModel/Indexer/StockStatusSelectBuilder.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@
1818
*/
1919
class StockStatusSelectBuilder
2020
{
21+
/**
22+
* @var \Magento\Framework\App\ResourceConnection
23+
*/
24+
private $resourceConnection;
25+
26+
/**
27+
* @var \Magento\Framework\EntityManager\MetadataPool
28+
*/
29+
private $metadataPool;
30+
31+
/**
32+
* @var \Magento\Eav\Model\Config
33+
*/
34+
private $eavConfig;
2135

2236
/**
2337
* @param \Magento\Framework\App\ResourceConnection $resourceConnection

app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/Form/Modifier/BundlePanelTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
*/
2424
class BundlePanelTest extends TestCase
2525
{
26+
/**
27+
* @var ObjectManager
28+
*/
29+
private $objectManager;
30+
2631
/**
2732
* @var UrlInterface|MockObject
2833
*/

app/code/Magento/Catalog/Block/Product/View/Options.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ class Options extends \Magento\Framework\View\Element\Template
6060
*/
6161
protected $_catalogData;
6262

63+
/**
64+
* @var \Magento\Framework\Stdlib\ArrayUtils
65+
*/
66+
private $arrayUtils;
67+
6368
/**
6469
* @param \Magento\Framework\View\Element\Template\Context $context
6570
* @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
@@ -93,7 +98,7 @@ public function __construct(
9398
* Retrieve product object
9499
*
95100
* @return Product
96-
* @throws \LogicExceptions
101+
* @throws \LogicException
97102
*/
98103
public function getProduct()
99104
{

app/code/Magento/Catalog/Model/Attribute/ScopeOverriddenValue.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class ScopeOverriddenValue
4545
*/
4646
private $resourceConnection;
4747

48+
/**
49+
* @var FilterBuilder
50+
*/
51+
private $filterBuilder;
52+
4853
/**
4954
* ScopeOverriddenValue constructor.
5055
* @param AttributeRepository $attributeRepository

app/code/Magento/Catalog/Model/Category/AttributeRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class AttributeRepository implements CategoryAttributeRepositoryInterface
2424
*/
2525
protected $eavAttributeRepository;
2626

27+
/**
28+
* @var \Magento\Eav\Model\Config
29+
*/
30+
private $eavConfig;
31+
2732
/**
2833
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
2934
* @param \Magento\Framework\Api\FilterBuilder $filterBuilder

app/code/Magento/Catalog/Model/Config.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ class Config extends \Magento\Eav\Model\Config
4444
*/
4545
protected $_productTypesById;
4646

47+
/**
48+
* @var array
49+
*/
50+
private $_productTypesByName;
51+
4752
/**
4853
* Array of attributes codes needed for product load
4954
*
@@ -175,16 +180,6 @@ public function __construct(
175180
);
176181
}
177182

178-
/**
179-
* Initialize resource model
180-
*
181-
* @return void
182-
*/
183-
protected function _construct()
184-
{
185-
$this->_init(\Magento\Catalog\Model\ResourceModel\Config::class);
186-
}
187-
188183
/**
189184
* Set store id
190185
*

app/code/Magento/Catalog/Model/CustomOptions/CustomOption.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
class CustomOption extends AbstractExtensibleModel implements CustomOptionInterface
1919
{
20+
/**
21+
* @var FileProcessor
22+
*/
23+
private $fileProcessor;
24+
2025
/**
2126
* @param Context $context
2227
* @param Registry $registry

app/code/Magento/Catalog/Model/Layer/Filter/Dynamic/Manual.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,41 @@ class Manual implements AlgorithmInterface
1818
{
1919
const XML_PATH_RANGE_MAX_INTERVALS = 'catalog/layered_navigation/price_range_max_intervals';
2020

21+
/**
22+
* @var Algorithm
23+
*/
24+
private $algorithm;
25+
26+
/**
27+
* @var \Magento\Catalog\Model\Layer
28+
*/
29+
private $layer;
30+
31+
/**
32+
* @var ScopeConfigInterface
33+
*/
34+
private $scopeConfig;
35+
36+
/**
37+
* @var Render
38+
*/
39+
private $render;
40+
41+
/**
42+
* @var Registry
43+
*/
44+
private $coreRegistry;
45+
46+
/**
47+
* @var Range
48+
*/
49+
private $range;
50+
51+
/**
52+
* @var Price
53+
*/
54+
private $resource;
55+
2156
/**
2257
* @param Algorithm $algorithm
2358
* @param Resolver $layerResolver

0 commit comments

Comments
 (0)