Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/2.3-develop' into bugfix/massa…
Browse files Browse the repository at this point in the history
…ction-grid-issue
  • Loading branch information
nmalevanec committed Mar 12, 2019
2 parents 314d3a8 + 9d231d1 commit 631c6b1
Show file tree
Hide file tree
Showing 1,858 changed files with 65,830 additions and 11,772 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="notifications">
<uiComponent name="notification_area"/>
<uiComponent name="notification_area" aclResource="Magento_AdminNotification::show_list"/>
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup"
name="unread_system_messages"
as="unread_system_messages"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ protected function saveAndReplaceAdvancedPrices()
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
$this->processCountExistingPrices($tierPrices, self::TABLE_TIER_PRICE)
->processCountNewPrices($tierPrices);

$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
if ($listSku) {
$this->setUpdatedAt($listSku);
Expand Down Expand Up @@ -562,11 +563,14 @@ protected function processCountExistingPrices($prices, $table)

$tableName = $this->_resourceFactory->create()->getTable($table);
$productEntityLinkField = $this->getProductEntityLinkField();
$existingPrices = $this->_connection->fetchAssoc(
$existingPrices = $this->_connection->fetchAll(
$this->_connection->select()->from(
$tableName,
['value_id', $productEntityLinkField, 'all_groups', 'customer_group_id']
)->where($productEntityLinkField . ' IN (?)', $existProductIds)
[$productEntityLinkField, 'all_groups', 'customer_group_id', 'qty']
)->where(
$productEntityLinkField . ' IN (?)',
$existProductIds
)
);
foreach ($existingPrices as $existingPrice) {
foreach ($prices as $sku => $skuPrices) {
Expand All @@ -591,8 +595,10 @@ protected function incrementCounterUpdated($prices, $existingPrice)
foreach ($prices as $price) {
if ($existingPrice['all_groups'] == $price['all_groups']
&& $existingPrice['customer_group_id'] == $price['customer_group_id']
&& (int) $existingPrice['qty'] === (int) $price['qty']
) {
$this->countItemsUpdated++;
continue;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ public function testProcessCountExistingPrices(
);
$dbSelectMock = $this->createMock(\Magento\Framework\DB\Select::class);
$this->connection->expects($this->once())
->method('fetchAssoc')
->method('fetchAll')
->willReturn($existingPrices);
$this->connection->expects($this->once())
->method('select')
Expand All @@ -930,7 +930,7 @@ public function testProcessCountExistingPrices(
->method('from')
->with(
self::TABLE_NAME,
['value_id', self::LINK_FIELD, 'all_groups', 'customer_group_id']
[self::LINK_FIELD, 'all_groups', 'customer_group_id', 'qty']
)->willReturnSelf();
$this->advancedPricing->expects($this->once())
->method('retrieveOldSkus')
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdvancedSearch/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
</depends>
</field>
<!--<group id="suggestions">-->
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable Search Suggestions</label>
<comment>When you enable this option your site may slow down.</comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="search_suggestion_count" translate="label" type="text" sortOrder="71" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="search_suggestion_count" translate="label" type="text" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Search Suggestions Count</label>
<depends>
<field id="search_suggestion_enabled">1</field>
</depends>
</field>
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Show Results Count for Each Suggestion</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>When you enable this option your site may slow down.</comment>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminAdvancedReportingSection">
<element name="goToAdvancedReporting" type="text" selector="//div[@class='dashboard-advanced-reports-actions']/a[@title='Go to Advanced Reporting']" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminAdvancedReportingButtonTest">
<annotations>
<stories value="AdvancedReporting"/>
<title value="AdvancedReportingButtonTest"/>
<description value="Test log in to AdvancedReporting and tests AdvancedReportingButtonTest"/>
<testCaseId value="MC-14800"/>
<severity value="CRITICAL"/>
<group value="analytics"/>
<group value="mtf_migrated"/>
</annotations>

<before>
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logout"/>
</after>

<!--Navigate through Advanced Reporting button on dashboard to Sign Up page-->
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
<switchToNextTab stepKey="switchToNewTab"/>
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
</test>
</tests>
18 changes: 16 additions & 2 deletions app/code/Magento/AsynchronousOperations/Model/MassConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Magento\AsynchronousOperations\Model;

use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Registry;
use Psr\Log\LoggerInterface;
use Magento\Framework\MessageQueue\MessageLockException;
use Magento\Framework\MessageQueue\ConnectionLostException;
Expand Down Expand Up @@ -58,6 +59,11 @@ class MassConsumer implements ConsumerInterface
*/
private $operationProcessor;

/**
* @var Registry
*/
private $registry;

/**
* Initialize dependencies.
*
Expand All @@ -67,14 +73,16 @@ class MassConsumer implements ConsumerInterface
* @param ConsumerConfigurationInterface $configuration
* @param OperationProcessorFactory $operationProcessorFactory
* @param LoggerInterface $logger
* @param Registry $registry
*/
public function __construct(
CallbackInvoker $invoker,
ResourceConnection $resource,
MessageController $messageController,
ConsumerConfigurationInterface $configuration,
OperationProcessorFactory $operationProcessorFactory,
LoggerInterface $logger
LoggerInterface $logger,
Registry $registry = null
) {
$this->invoker = $invoker;
$this->resource = $resource;
Expand All @@ -84,20 +92,26 @@ public function __construct(
'configuration' => $configuration
]);
$this->logger = $logger;
$this->registry = $registry ?? \Magento\Framework\App\ObjectManager::getInstance()
->get(Registry::class);
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function process($maxNumberOfMessages = null)
{
$this->registry->register('isSecureArea', true, true);

$queue = $this->configuration->getQueue();

if (!isset($maxNumberOfMessages)) {
$queue->subscribe($this->getTransactionCallback($queue));
} else {
$this->invoker->invoke($queue, $maxNumberOfMessages, $this->getTransactionCallback($queue));
}

$this->registry->unregister('isSecureArea');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Block\Adminhtml\Order\View\Info;

use Magento\Authorizenet\Model\Directpost;

/**
* Fraud information block for Authorize.net payment method
*
* @api
* @since 100.0.2
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class FraudDetails extends \Magento\Backend\Block\Template
{
Expand All @@ -33,6 +38,8 @@ public function __construct(
}

/**
* Return payment method model
*
* @return \Magento\Sales\Model\Order\Payment
*/
public function getPayment()
Expand All @@ -42,6 +49,8 @@ public function getPayment()
}

/**
* Produce and return the block's HTML output
*
* @return string
*/
protected function _toHtml()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

/**
* Payment information block for Authorize.net payment method
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class PaymentDetails extends ConfigurableInfo
{
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/Authorizenet/Block/Transparent/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Block\Transparent;

use Magento\Payment\Block\Transparent\Iframe as TransparentIframe;

/**
* Transparent Iframe block for Authorize.net payments
* @api
* @since 100.0.2
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class Iframe extends TransparentIframe
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

class AddConfigured extends \Magento\Sales\Controller\Adminhtml\Order\Create\AddConfigured
use Magento\Framework\App\Action\HttpPutActionInterface;
use Magento\Sales\Controller\Adminhtml\Order\Create\AddConfigured as BaseAddConfigured;

/**
* Class AddConfigured
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class AddConfigured extends BaseAddConfigured implements HttpPutActionInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

class Cancel extends \Magento\Sales\Controller\Adminhtml\Order\Create\Cancel
use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Sales\Controller\Adminhtml\Order\Create\Cancel as BaseCancel;

/**
* Class Cancel
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class Cancel extends BaseCancel implements HttpPostActionInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

class ConfigureProductToAdd extends \Magento\Sales\Controller\Adminhtml\Order\Create\ConfigureProductToAdd
use Magento\Framework\App\Action\HttpPutActionInterface;
use Magento\Sales\Controller\Adminhtml\Order\Create\ConfigureProductToAdd as BaseConfigureProductToAdd;

/**
* Class ConfigureProductToAdd
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class ConfigureProductToAdd extends BaseConfigureProductToAdd implements HttpPutActionInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

class ConfigureQuoteItems extends \Magento\Sales\Controller\Adminhtml\Order\Create\ConfigureQuoteItems
use Magento\Framework\App\Action\HttpPutActionInterface;
use Magento\Sales\Controller\Adminhtml\Order\Create\ConfigureQuoteItems as BaseConfigureQuoteItems;

/**
* Class ConfigureQuoteItems
* @deprecated 2.3 Authorize.net is removing all support for this payment method
*/
class ConfigureQuoteItems extends BaseConfigureQuoteItems implements HttpPutActionInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

/**
* Class Index
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class Index extends \Magento\Sales\Controller\Adminhtml\Order\Create\Index
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment;

/**
* Class LoadBlock
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class LoadBlock extends \Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock
{
}
Loading

0 comments on commit 631c6b1

Please sign in to comment.