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

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

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

app/code/Magento/AdvancedSearch/Test/Unit/Model/ResourceModel/IndexTest.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use Magento\Framework\App\ResourceConnection;
1616
use Magento\Framework\DB\Select;
1717

18+
/**
19+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
20+
*/
1821
class IndexTest extends \PHPUnit\Framework\TestCase
1922
{
2023
/**
@@ -59,10 +62,24 @@ protected function setUp()
5962
$this->resourceConnectionMock->expects($this->any())->method('getConnection')->willReturn($this->adapterMock);
6063
$this->metadataPoolMock = $this->createMock(MetadataPool::class);
6164

65+
$indexScopeResolverMock = $this->createMock(
66+
\Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver::class
67+
);
68+
$traversableMock = $this->createMock(\Traversable::class);
69+
$dimensionsMock = $this->createMock(\Magento\Framework\Indexer\MultiDimensionProvider::class);
70+
$dimensionsMock->method('getIterator')->willReturn($traversableMock);
71+
$dimensionFactoryMock = $this->createMock(
72+
\Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory::class
73+
);
74+
$dimensionFactoryMock->method('create')->willReturn($dimensionsMock);
75+
6276
$this->model = new Index(
6377
$this->resourceContextMock,
6478
$this->storeManagerMock,
65-
$this->metadataPoolMock
79+
$this->metadataPoolMock,
80+
'connectionName',
81+
$indexScopeResolverMock,
82+
$dimensionFactoryMock
6683
);
6784
}
6885

@@ -71,11 +88,13 @@ public function testGetPriceIndexDataUsesFrontendPriceIndexerTable()
7188
$storeId = 1;
7289
$storeMock = $this->createMock(StoreInterface::class);
7390
$storeMock->expects($this->any())->method('getId')->willReturn($storeId);
91+
$storeMock->method('getWebsiteId')->willReturn(1);
7492
$this->storeManagerMock->expects($this->once())->method('getStore')->with($storeId)->willReturn($storeMock);
7593

7694
$selectMock = $this->createMock(Select::class);
7795
$selectMock->expects($this->any())->method('from')->willReturnSelf();
7896
$selectMock->expects($this->any())->method('where')->willReturnSelf();
97+
$selectMock->expects($this->any())->method('union')->willReturnSelf();
7998
$this->adapterMock->expects($this->once())->method('select')->willReturn($selectMock);
8099
$this->adapterMock->expects($this->once())->method('fetchAll')->with($selectMock)->willReturn([]);
81100

app/code/Magento/AdvancedSearch/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
},
1818
"type": "magento2-module",
1919
"license": [
20-
"proprietary"
20+
"OSL-3.0",
21+
"AFL-3.0"
2122
],
2223
"autoload": {
2324
"files": [

app/code/Magento/AdvancedSearch/etc/di.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,25 @@
1919
<argument name="title" xsi:type="string" translatable="true">Did you mean</argument>
2020
</arguments>
2121
</type>
22+
<type name="Magento\AdvancedSearch\Model\Client\ClientResolver">
23+
<arguments>
24+
<argument name="path" xsi:type="const">Magento\CatalogSearch\Model\ResourceModel\EngineInterface::CONFIG_ENGINE_PATH</argument>
25+
<argument name="scopeType" xsi:type="const">\Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument>
26+
</arguments>
27+
</type>
2228
<type name="Magento\AdvancedSearch\Model\SuggestedQueries">
2329
<arguments>
2430
<argument name="data" xsi:type="array">
2531
<item name="mysql" xsi:type="string">Magento\AdvancedSearch\Model\DataProvider\Suggestions</item>
2632
</argument>
2733
</arguments>
2834
</type>
35+
<type name="Magento\AdvancedSearch\Model\ResourceModel\Index">
36+
<arguments>
37+
<argument name="tableResolver" xsi:type="object">
38+
Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver
39+
</argument>
40+
</arguments>
41+
</type>
2942
<preference for="Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProviderInterface" type="Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProvider" />
3043
</config>

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

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

app/code/Magento/Amqp/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"type": "magento2-module",
1414
"license": [
15-
"proprietary"
15+
"OSL-3.0",
16+
"AFL-3.0"
1617
],
1718
"autoload": {
1819
"files": [

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</after>
2323
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
2424
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
25+
<waitForPageLoad stepKey="waitForAdminConfig"/>
2526
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
2627
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
2728
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="--Please Select--"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
<severity value="MAJOR"/>
1717
<testCaseId value="MAGETWO-66465"/>
1818
<group value="analytics"/>
19-
<!-- MAGETWO-90659 -->
20-
<group value="skip"/>
19+
<skip>
20+
<issueId value="MAGETWO-90659"/>
21+
</skip>
2122
</annotations>
2223
<after>
2324
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>

0 commit comments

Comments
 (0)