Skip to content

Commit ddf42ca

Browse files
committed
Merge changes from 2.3.2-rc
2 parents 3609773 + 261c47b commit ddf42ca

File tree

2,976 files changed

+96107
-25542
lines changed

Some content is hidden

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

2,976 files changed

+96107
-25542
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ atlassian*
4848
/pub/media/import/*
4949
!/pub/media/import/.htaccess
5050
/pub/media/logo/*
51+
/pub/media/custom_options/*
52+
!/pub/media/custom_options/.htaccess
5153
/pub/media/theme/*
5254
/pub/media/theme_customization/*
5355
!/pub/media/theme_customization/.htaccess

CHANGELOG.md

Lines changed: 617 additions & 5 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<h2>Welcome</h2>
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

8-
## Magento system requirements
9-
[Magento system requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
8+
## Magento System Requirements
9+
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html).
1010

1111
## Install Magento
1212

13-
* [Installation guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
13+
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
1414

15-
<h2>Contributing to the Magento 2 code base</h2>
15+
<h2>Contributing to the Magento 2 Code Base</h2>
1616
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
1717

1818
To learn about how to make a contribution, click [here][1].
@@ -39,13 +39,13 @@ Magento is thankful for any contribution that can improve our code base, documen
3939
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
4040
</a>
4141

42-
### Labels applied by the Magento team
42+
### Labels Applied by the Magento Team
4343
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.
4444
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.
4545

46-
## Reporting security issues
46+
## Reporting Security Issues
4747

48-
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
48+
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up your issue.
4949

5050
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5151

app/bootstrap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Environment initialization
99
*/
1010
error_reporting(E_ALL);
11-
stream_wrapper_unregister('phar');
11+
if (in_array('phar', \stream_get_wrappers())) {
12+
stream_wrapper_unregister('phar');
13+
}
1214
#ini_set('display_errors', 1);
1315

1416
/* PHP version validation */
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminMenuSystem">
12+
<data key="pageTitle">System</data>
13+
<data key="title">Notifications</data>
14+
<data key="dataUiId">magento-backend-system</data>
15+
</entity>
16+
<entity name="AdminMenuSystemOtherSettingsNotifications">
17+
<data key="pageTitle">Notifications</data>
18+
<data key="title">Notifications</data>
19+
<data key="dataUiId">magento-adminnotification-system-adminnotification</data>
20+
</entity>
21+
</entities>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminSystemNotificationNavigateMenuTest">
12+
<annotations>
13+
<features value="AdminNotification"/>
14+
<stories value="Menu Navigation"/>
15+
<title value="Admin system notification navigate menu test"/>
16+
<description value="Admin should be able to navigate to System > Notifications"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-14125"/>
19+
<group value="menu"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemNotificationPage">
29+
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
30+
<argument name="submenuUiId" value="{{AdminMenuSystemOtherSettingsNotifications.dataUiId}}"/>
31+
</actionGroup>
32+
<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
33+
<argument name="title" value="{{AdminMenuSystemOtherSettingsNotifications.pageTitle}}"/>
34+
</actionGroup>
35+
</test>
36+
</tests>

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
"Magento\\AdminNotification\\": ""
2727
}
2828
},
29-
"version": "100.3.1"
29+
"version": "100.3.2"
3030
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.notification.container.grid" as="grid">
1212
<arguments>
1313
<argument name="id" xsi:type="string">notificationGrid</argument>
14-
<argument name="dataSource" xsi:type="object">Magento\AdminNotification\Model\ResourceModel\Grid\Collection</argument>
14+
<argument name="dataSource" xsi:type="object" shared="false">Magento\AdminNotification\Model\ResourceModel\Grid\Collection</argument>
1515
<argument name="default_dir" xsi:type="string">DESC</argument>
1616
<argument name="default_sort" xsi:type="string">date_added</argument>
1717
<argument name="save_parameters_in_session" xsi:type="string">1</argument>

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract
185185
* @param AdvancedPricing\Validator\Website $websiteValidator
186186
* @param AdvancedPricing\Validator\TierPrice $tierPriceValidator
187187
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
188+
* @throws \Exception
188189
*/
189190
public function __construct(
190191
\Magento\Framework\Json\Helper\Data $jsonHelper,
@@ -255,6 +256,7 @@ public function getEntityTypeCode()
255256
* @param array $rowData
256257
* @param int $rowNum
257258
* @return bool
259+
* @throws \Zend_Validate_Exception
258260
*/
259261
public function validateRow(array $rowData, $rowNum)
260262
{
@@ -308,6 +310,7 @@ protected function _importData()
308310
* Save advanced pricing
309311
*
310312
* @return $this
313+
* @throws \Exception
311314
*/
312315
public function saveAdvancedPricing()
313316
{
@@ -319,6 +322,7 @@ public function saveAdvancedPricing()
319322
* Deletes Advanced price data from raw data.
320323
*
321324
* @return $this
325+
* @throws \Exception
322326
*/
323327
public function deleteAdvancedPricing()
324328
{
@@ -347,6 +351,7 @@ public function deleteAdvancedPricing()
347351
* Replace advanced pricing
348352
*
349353
* @return $this
354+
* @throws \Exception
350355
*/
351356
public function replaceAdvancedPricing()
352357
{
@@ -360,6 +365,7 @@ public function replaceAdvancedPricing()
360365
* @return $this
361366
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
362367
* @SuppressWarnings(PHPMD.NPathComplexity)
368+
* @throws \Exception
363369
*/
364370
protected function saveAndReplaceAdvancedPrices()
365371
{
@@ -368,8 +374,8 @@ protected function saveAndReplaceAdvancedPrices()
368374
$this->_cachedSkuToDelete = null;
369375
}
370376
$listSku = [];
377+
$tierPrices = [];
371378
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
372-
$tierPrices = [];
373379
foreach ($bunch as $rowNum => $rowData) {
374380
if (!$this->validateRow($rowData, $rowNum)) {
375381
$this->addRowError(ValidatorInterface::ERROR_SKU_IS_EMPTY, $rowNum);
@@ -397,23 +403,28 @@ protected function saveAndReplaceAdvancedPrices()
397403
];
398404
}
399405
}
400-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $behavior) {
401-
if ($listSku) {
402-
$this->processCountNewPrices($tierPrices);
403-
if ($this->deleteProductTierPrices(array_unique($listSku), self::TABLE_TIER_PRICE)) {
404-
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
405-
$this->setUpdatedAt($listSku);
406-
}
407-
}
408-
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
406+
407+
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
409408
$this->processCountExistingPrices($tierPrices, self::TABLE_TIER_PRICE)
410409
->processCountNewPrices($tierPrices);
410+
411411
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
412412
if ($listSku) {
413413
$this->setUpdatedAt($listSku);
414414
}
415415
}
416416
}
417+
418+
if (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $behavior) {
419+
if ($listSku) {
420+
$this->processCountNewPrices($tierPrices);
421+
if ($this->deleteProductTierPrices(array_unique($listSku), self::TABLE_TIER_PRICE)) {
422+
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
423+
$this->setUpdatedAt($listSku);
424+
}
425+
}
426+
}
427+
417428
return $this;
418429
}
419430

@@ -423,6 +434,7 @@ protected function saveAndReplaceAdvancedPrices()
423434
* @param array $priceData
424435
* @param string $table
425436
* @return $this
437+
* @throws \Exception
426438
*/
427439
protected function saveProductPrices(array $priceData, $table)
428440
{
@@ -454,6 +466,7 @@ protected function saveProductPrices(array $priceData, $table)
454466
* @param array $listSku
455467
* @param string $table
456468
* @return boolean
469+
* @throws \Exception
457470
*/
458471
protected function deleteProductTierPrices(array $listSku, $table)
459472
{
@@ -531,6 +544,7 @@ protected function getCustomerGroupId($customerGroup)
531544
* Retrieve product skus
532545
*
533546
* @return array
547+
* @throws \Exception
534548
*/
535549
protected function retrieveOldSkus()
536550
{
@@ -551,6 +565,7 @@ protected function retrieveOldSkus()
551565
* @param array $prices
552566
* @param string $table
553567
* @return $this
568+
* @throws \Exception
554569
*/
555570
protected function processCountExistingPrices($prices, $table)
556571
{
@@ -562,11 +577,14 @@ protected function processCountExistingPrices($prices, $table)
562577

563578
$tableName = $this->_resourceFactory->create()->getTable($table);
564579
$productEntityLinkField = $this->getProductEntityLinkField();
565-
$existingPrices = $this->_connection->fetchAssoc(
580+
$existingPrices = $this->_connection->fetchAll(
566581
$this->_connection->select()->from(
567582
$tableName,
568-
['value_id', $productEntityLinkField, 'all_groups', 'customer_group_id']
569-
)->where($productEntityLinkField . ' IN (?)', $existProductIds)
583+
[$productEntityLinkField, 'all_groups', 'customer_group_id', 'qty']
584+
)->where(
585+
$productEntityLinkField . ' IN (?)',
586+
$existProductIds
587+
)
570588
);
571589
foreach ($existingPrices as $existingPrice) {
572590
foreach ($prices as $sku => $skuPrices) {
@@ -591,8 +609,10 @@ protected function incrementCounterUpdated($prices, $existingPrice)
591609
foreach ($prices as $price) {
592610
if ($existingPrice['all_groups'] == $price['all_groups']
593611
&& $existingPrice['customer_group_id'] == $price['customer_group_id']
612+
&& (int) $existingPrice['qty'] === (int) $price['qty']
594613
) {
595614
$this->countItemsUpdated++;
615+
continue;
596616
}
597617
}
598618
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ public function testProcessCountExistingPrices(
921921
);
922922
$dbSelectMock = $this->createMock(\Magento\Framework\DB\Select::class);
923923
$this->connection->expects($this->once())
924-
->method('fetchAssoc')
924+
->method('fetchAll')
925925
->willReturn($existingPrices);
926926
$this->connection->expects($this->once())
927927
->method('select')
@@ -930,7 +930,7 @@ public function testProcessCountExistingPrices(
930930
->method('from')
931931
->with(
932932
self::TABLE_NAME,
933-
['value_id', self::LINK_FIELD, 'all_groups', 'customer_group_id']
933+
[self::LINK_FIELD, 'all_groups', 'customer_group_id', 'qty']
934934
)->willReturnSelf();
935935
$this->advancedPricing->expects($this->once())
936936
->method('retrieveOldSkus')

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"Magento\\AdvancedPricingImportExport\\": ""
2929
}
3030
},
31-
"version": "100.3.1"
31+
"version": "100.3.2"
3232
}

app/code/Magento/AdvancedSearch/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"Magento\\AdvancedSearch\\": ""
2929
}
3030
},
31-
"version": "100.3.1"
31+
"version": "100.3.2"
3232
}

app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<block class="Magento\AdvancedSearch\Block\Adminhtml\Search\Grid" name="search.edit.grid" as="grid">
1212
<arguments>
1313
<argument name="id" xsi:type="string">catalog_search_grid</argument>
14-
<argument name="dataSource" xsi:type="object">Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection</argument>
14+
<argument name="dataSource" xsi:type="object" shared="false">Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection</argument>
1515
<argument name="default_sort" xsi:type="string">name</argument>
1616
<argument name="default_dir" xsi:type="string">ASC</argument>
1717
<argument name="save_parameters_in_session" xsi:type="string">1</argument>

app/code/Magento/Amqp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
"Magento\\Amqp\\": ""
2424
}
2525
},
26-
"version": "100.3.1"
26+
"version": "100.3.2"
2727
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminMenuReports">
12+
<data key="pageTitle">Reports</data>
13+
<data key="title">Reports</data>
14+
<data key="dataUiId">magento-reports-report</data>
15+
</entity>
16+
<entity name="AdminMenuReportsBusinessIntelligenceAdvancedReporting">
17+
<data key="pageTitle">AdvancedReporting</data>
18+
<data key="title">AdvancedReporting</data>
19+
<data key="dataUiId">magento-analytics-advanced-reporting</data>
20+
</entity>
21+
</entities>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
<section name="AdminAdvancedReportingSection">
10+
<element name="goToAdvancedReporting" type="text" selector="//div[@class='dashboard-advanced-reports-actions']/a[@title='Go to Advanced Reporting']" timeout="30"/>
11+
</section>
12+
</sections>

0 commit comments

Comments
 (0)