Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 1232e6d

Browse files
Merge pull request #1 from magento/2.3-develop
merge from magento/magento2
2 parents f53d78d + 19e9ada commit 1232e6d

File tree

1,278 files changed

+41186
-12862
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,278 files changed

+41186
-12862
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ cache:
5454
- $HOME/node_modules
5555
- $HOME/yarn.lock
5656
before_install:
57-
- curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.0/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch restart
5857
- ./dev/travis/before_install.sh
5958
install: composer install --no-interaction
6059
before_script: ./dev/travis/before_script.sh

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ Tests:
489489
* Fixed an issue where found records in global search in Backend could not be selected via keyboard
490490
* Fixed an issue where Category menu items went out of screen when page side was reached
491491
* Fixed an issue where subcategories in menu were shown instantly when user moved mouse quickly
492-
* Fixed an issue where popup header was our of window range while creating group product
492+
* Fixed an issue where popup header was out of window range while creating group product
493493
* Fixed an issue where region field was absent in customer address form on backend for "United Kingdom" country
494494
* Fixed an ability to edit the Order from Admin panel
495495
* Fixed an issue where email could not be retrieved from \Magento\Quote\Api\Data\AddressInterface after adding an address on OnePageCheckout
@@ -626,7 +626,7 @@ Tests:
626626
* Fixed an issue where filters were not shown on product reviews report grid
627627
* Fixed an issue where second customer address was not deleted from customer account
628628
* Fixed an issue where custom options pop-up was still displayed after submit
629-
* Fixed an issue where Second Product was not added to Shopping Cart from Wishlist at first atempt
629+
* Fixed an issue where Second Product was not added to Shopping Cart from Wishlist at first attempt
630630
* Fixed an issue where customer invalid email message was not displayed
631631
* Fixed an issue where All Access Tokens for Customer without Tokens could not be revoked
632632
* Fixed an issue where it was impossible to add Product to Shopping Cart from shared Wishlist

README.md

Lines changed: 6 additions & 6 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-requirements2.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,11 +39,11 @@ 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

4848
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).
4949

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/AdvancedSearch/etc/adminhtml/system.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@
4848
</depends>
4949
</field>
5050
<!--<group id="suggestions">-->
51-
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
51+
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
5252
<label>Enable Search Suggestions</label>
5353
<comment>When you enable this option your site may slow down.</comment>
5454
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
5555
</field>
56-
<field id="search_suggestion_count" translate="label" type="text" sortOrder="71" showInDefault="1" showInWebsite="1" showInStore="1">
56+
<field id="search_suggestion_count" translate="label" type="text" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="1">
5757
<label>Search Suggestions Count</label>
5858
<depends>
5959
<field id="search_suggestion_enabled">1</field>
6060
</depends>
6161
</field>
62-
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="1">
62+
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="1">
6363
<label>Show Results Count for Each Suggestion</label>
6464
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
6565
<comment>When you enable this option your site may slow down.</comment>
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>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminAdvancedReportingButtonTest">
11+
<annotations>
12+
<stories value="AdvancedReporting"/>
13+
<title value="AdvancedReportingButtonTest"/>
14+
<description value="Test log in to AdvancedReporting and tests AdvancedReportingButtonTest"/>
15+
<testCaseId value="MC-14800"/>
16+
<severity value="CRITICAL"/>
17+
<group value="analytics"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="logout" stepKey="logout"/>
26+
</after>
27+
28+
<!--Navigate through Advanced Reporting button on dashboard to Sign Up page-->
29+
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
30+
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
31+
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
32+
<switchToNextTab stepKey="switchToNewTab"/>
33+
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
34+
</test>
35+
</tests>

app/code/Magento/AsynchronousOperations/Model/MassConsumer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Magento\Framework\MessageQueue\MessageLockException;
1515
use Magento\Framework\MessageQueue\ConnectionLostException;
1616
use Magento\Framework\Exception\NotFoundException;
17-
use Magento\Framework\MessageQueue\CallbackInvoker;
17+
use Magento\Framework\MessageQueue\CallbackInvokerInterface;
1818
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
1919
use Magento\Framework\MessageQueue\EnvelopeInterface;
2020
use Magento\Framework\MessageQueue\QueueInterface;
@@ -30,7 +30,7 @@
3030
class MassConsumer implements ConsumerInterface
3131
{
3232
/**
33-
* @var \Magento\Framework\MessageQueue\CallbackInvoker
33+
* @var CallbackInvokerInterface
3434
*/
3535
private $invoker;
3636

@@ -67,7 +67,7 @@ class MassConsumer implements ConsumerInterface
6767
/**
6868
* Initialize dependencies.
6969
*
70-
* @param CallbackInvoker $invoker
70+
* @param CallbackInvokerInterface $invoker
7171
* @param ResourceConnection $resource
7272
* @param MessageController $messageController
7373
* @param ConsumerConfigurationInterface $configuration
@@ -76,7 +76,7 @@ class MassConsumer implements ConsumerInterface
7676
* @param Registry $registry
7777
*/
7878
public function __construct(
79-
CallbackInvoker $invoker,
79+
CallbackInvokerInterface $invoker,
8080
ResourceConnection $resource,
8181
MessageController $messageController,
8282
ConsumerConfigurationInterface $configuration,

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,15 +546,16 @@ public function setResponseData(array $postData)
546546
public function validateResponse()
547547
{
548548
$response = $this->getResponse();
549-
//md5 check
550-
if (!$this->getConfigData('trans_md5')
551-
|| !$this->getConfigData('login')
552-
|| !$response->isValidHash($this->getConfigData('trans_md5'), $this->getConfigData('login'))
549+
$hashConfigKey = !empty($response->getData('x_SHA2_Hash')) ? 'signature_key' : 'trans_md5';
550+
551+
//hash check
552+
if (!$response->isValidHash($this->getConfigData($hashConfigKey), $this->getConfigData('login'))
553553
) {
554554
throw new \Magento\Framework\Exception\LocalizedException(
555555
__('The transaction was declined because the response hash validation failed.')
556556
);
557557
}
558+
558559
return true;
559560
}
560561

0 commit comments

Comments
 (0)