Skip to content

Commit 16c17ba

Browse files
author
Valeriy Nayda
committed
Merge remote-tracking branch 'origin/2.3-develop' into assert-response-field-refactor
2 parents 33a06d3 + a7893f9 commit 16c17ba

File tree

1,566 files changed

+33697
-15454
lines changed

Some content is hidden

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

1,566 files changed

+33697
-15454
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ Tests:
19771977
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
19781978
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
19791979
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
1980-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
1980+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
19811981
* Service Contracts:
19821982
* Refactored usage of new API of the Customer module
19831983
* Implemented Service Contracts for the Sales module

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma
5858

5959
<h2>Reporting security issues</h2>
6060

61-
To report security vulnerabilities in Magento software or web sites, please e-mail <a href="mailto:[email protected]">[email protected]</a>. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our <a href="https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc">encryption key</a> if it includes sensitive information. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
61+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
6262

6363
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
6464

app/bootstrap.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,16 @@
5454
&& isset($_SERVER['HTTP_ACCEPT'])
5555
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
5656
) {
57-
\Magento\Framework\Profiler::applyConfig(
58-
(isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])) ? $_SERVER['MAGE_PROFILER'] : trim(file_get_contents(BP . '/var/profiler.flag')),
57+
$profilerConfig = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
58+
? $_SERVER['MAGE_PROFILER']
59+
: trim(file_get_contents(BP . '/var/profiler.flag'));
60+
61+
if ($profilerConfig) {
62+
$profilerConfig = json_decode($profilerConfig, true) ?: $profilerConfig;
63+
}
64+
65+
Magento\Framework\Profiler::applyConfig(
66+
$profilerConfig,
5967
BP,
6068
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
6169
);

app/code/Magento/AdminNotification/Observer/PredispatchAdminActionControllerObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
}
3838

3939
/**
40-
* Predispath admin action controller
40+
* Predispatch admin action controller
4141
*
4242
* @param \Magento\Framework\Event\Observer $observer
4343
* @return void

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

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

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"[data-role=system_messages_list]": {
2525
"Magento_AdminNotification/js/system/messages/popup": {
26-
class: 'modal-system-messages ui-popup-message'
26+
"class":"modal-system-messages ui-popup-message"
2727
}
2828
}
2929
}
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/**
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
4-
*/
4+
*/
55

66
define([
77
'jquery',
88
'Magento_Ui/js/modal/modal'
9-
], function ($) {
9+
], function ($, modal) {
1010
'use strict';
1111

1212
return function (data, element) {
13-
if (this.modal) {
14-
this.modal.html($(element).html());
13+
14+
if (modal.modal) {
15+
modal.modal.html($(element).html());
1516
} else {
16-
this.modal = $(element).modal({
17+
modal.modal = $(element).modal({
1718
modalClass: data.class,
1819
type: 'popup',
1920
buttons: []
2021
});
2122
}
22-
this.modal.modal('openModal');
23+
24+
modal.modal.modal('openModal');
2325
};
2426
});

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

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

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ protected function setUp()
219219
'_getCustomerGroupById',
220220
'correctExportData'
221221
]);
222-
$this->advancedPricing = $this->getMockbuilder(
222+
$this->advancedPricing = $this->getMockBuilder(
223223
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
224224
)
225225
->setMethods($mockMethods)

app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66
namespace Magento\AdvancedSearch\Model\ResourceModel;
77

88
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
9+
use Magento\Framework\Search\Request\IndexScopeResolverInterface;
910
use Magento\Store\Model\StoreManagerInterface;
1011
use Magento\Framework\Model\ResourceModel\Db\Context;
1112
use Magento\Framework\EntityManager\MetadataPool;
1213
use Magento\Catalog\Api\Data\CategoryInterface;
1314
use Magento\Framework\App\ObjectManager;
14-
use Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver as TableResolver;
1515
use Magento\Framework\Search\Request\Dimension;
1616
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
17+
use Magento\Framework\Search\Request\IndexScopeResolverInterface as TableResolver;
18+
use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory;
1719

1820
/**
1921
* @api
2022
* @since 100.1.0
23+
*
24+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2125
*/
2226
class Index extends AbstractDb
2327
{
@@ -38,25 +42,34 @@ class Index extends AbstractDb
3842
*/
3943
private $tableResolver;
4044

45+
/**
46+
* @var DimensionCollectionFactory|null
47+
*/
48+
private $dimensionCollectionFactory;
49+
4150
/**
4251
* Index constructor.
4352
* @param Context $context
4453
* @param StoreManagerInterface $storeManager
4554
* @param MetadataPool $metadataPool
4655
* @param null $connectionName
4756
* @param TableResolver|null $tableResolver
57+
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
4858
*/
4959
public function __construct(
5060
Context $context,
5161
StoreManagerInterface $storeManager,
5262
MetadataPool $metadataPool,
5363
$connectionName = null,
54-
TableResolver $tableResolver = null
64+
TableResolver $tableResolver = null,
65+
DimensionCollectionFactory $dimensionCollectionFactory = null
5566
) {
5667
parent::__construct($context, $connectionName);
5768
$this->storeManager = $storeManager;
5869
$this->metadataPool = $metadataPool;
59-
$this->tableResolver = $tableResolver ?: ObjectManager::getInstance()->get(TableResolver::class);
70+
$this->tableResolver = $tableResolver ?: ObjectManager::getInstance()->get(IndexScopeResolverInterface::class);
71+
$this->dimensionCollectionFactory = $dimensionCollectionFactory
72+
?: ObjectManager::getInstance()->get(DimensionCollectionFactory::class);
6073
}
6174

6275
/**
@@ -78,18 +91,22 @@ protected function _construct()
7891
protected function _getCatalogProductPriceData($productIds = null)
7992
{
8093
$connection = $this->getConnection();
81-
82-
$select = $connection->select()->from(
83-
$this->getTable('catalog_product_index_price'),
84-
['entity_id', 'customer_group_id', 'website_id', 'min_price']
85-
);
86-
87-
if ($productIds) {
88-
$select->where('entity_id IN (?)', $productIds);
94+
$catalogProductIndexPriceSelect = [];
95+
96+
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
97+
$catalogProductIndexPriceSelect[] = $connection->select()->from(
98+
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
99+
['entity_id', 'customer_group_id', 'website_id', 'min_price']
100+
);
101+
if ($productIds) {
102+
current($catalogProductIndexPriceSelect)->where('entity_id IN (?)', $productIds);
103+
}
89104
}
90105

106+
$catalogProductIndexPriceUnionSelect = $connection->select()->union($catalogProductIndexPriceSelect);
107+
91108
$result = [];
92-
foreach ($connection->fetchAll($select) as $row) {
109+
foreach ($connection->fetchAll($catalogProductIndexPriceUnionSelect) as $row) {
93110
$result[$row['website_id']][$row['entity_id']][$row['customer_group_id']] = round($row['min_price'], 2);
94111
}
95112

0 commit comments

Comments
 (0)