Skip to content

Commit ce3d92a

Browse files
author
Alexander Makeev
committed
Merge branch 'develop' of github.corp.magento.com:magento2/magento2ce into develop
2 parents cad9698 + 4e1a1bc commit ce3d92a

File tree

766 files changed

+14751
-11799
lines changed

Some content is hidden

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

766 files changed

+14751
-11799
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,14 +985,14 @@ private function invokeMethod($object, $method, $args = [])
985985
private function getAdvancedPricingMock($methods = [])
986986
{
987987
$metadataPoolMock = $this->getMock(
988-
\Magento\Framework\Model\Entity\MetadataPool::class,
988+
\Magento\Framework\EntityManager\MetadataPool::class,
989989
[],
990990
[],
991991
'',
992992
false
993993
);
994994
$metadataMock = $this->getMock(
995-
\Magento\Framework\Model\Entity\EntityMetadata::class,
995+
\Magento\Framework\EntityManager\EntityMetadata::class,
996996
[],
997997
[],
998998
'',

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet implements Tra
119119
*/
120120
protected $transactionRepository;
121121

122+
/**
123+
* @var \Psr\Log\LoggerInterface
124+
*/
125+
private $psrLogger;
126+
122127
/**
123128
* @param \Magento\Framework\Model\Context $context
124129
* @param \Magento\Framework\Registry $registry
@@ -761,7 +766,7 @@ protected function addStatusComment(\Magento\Sales\Model\Order\Payment $payment)
761766
{
762767
try {
763768
$transactionId = $this->getResponse()->getXTransId();
764-
$data = $payment->getMethodInstance()->getTransactionDetails($transactionId);
769+
$data = $this->transactionService->getTransactionDetails($this, $transactionId);
765770
$transactionStatus = (string)$data->transaction->transactionStatus;
766771
$fdsFilterAction = (string)$data->transaction->FDSFilterAction;
767772

@@ -779,6 +784,7 @@ protected function addStatusComment(\Magento\Sales\Model\Order\Payment $payment)
779784
$payment->getOrder()->addStatusHistoryComment($message);
780785
}
781786
} catch (\Exception $e) {
787+
$this->getPsrLogger()->critical($e);
782788
//this request is optional
783789
}
784790
return $this;
@@ -805,7 +811,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
805811
$order->registerCancellation($message)->save();
806812
} catch (\Exception $e) {
807813
//quiet decline
808-
$this->logger->critical($e);
814+
$this->getPsrLogger()->critical($e);
809815
}
810816
}
811817

@@ -973,4 +979,18 @@ protected function getTransactionResponse($transactionId)
973979

974980
return $response;
975981
}
982+
983+
/**
984+
* @return \Psr\Log\LoggerInterface
985+
*
986+
* @deprecated
987+
*/
988+
private function getPsrLogger()
989+
{
990+
if (null === $this->psrLogger) {
991+
$this->psrLogger = \Magento\Framework\App\ObjectManager::getInstance()
992+
->get(\Psr\Log\LoggerInterface::class);
993+
}
994+
return $this->psrLogger;
995+
}
976996
}

app/code/Magento/Backend/App/BackendAppList.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function getCurrentApp()
4444
if ($appName && isset($this->backendApps[$appName])) {
4545
return $this->backendApps[$appName];
4646
}
47+
return null;
4748
}
4849

4950
/**

app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
value=""
2828
data-validate="{required:true}"
2929
placeholder="<?php /* @escapeNotVerified */ echo __('user name') ?>"
30-
autocomplete="username"
30+
autocomplete="off"
3131
/>
3232
</div>
3333
</div>
@@ -43,7 +43,7 @@
4343
data-validate="{required:true}"
4444
value=""
4545
placeholder="<?php /* @escapeNotVerified */ echo __('password') ?>"
46-
autocomplete="current-password"
46+
autocomplete="off"
4747
/>
4848
</div>
4949
</div>

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/paypal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ define([
205205
container: 'paypal-container',
206206
singleUse: true,
207207
headless: true,
208-
amount: this.amount,
208+
amount: this.grandTotalAmount,
209209
currency: totals['base_currency_code'],
210210
locale: this.getLocale(),
211211
enableShippingAddress: true,

app/code/Magento/Bundle/Model/LinkManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Framework\App\ObjectManager;
1212
use Magento\Framework\Exception\CouldNotSaveException;
1313
use Magento\Framework\Exception\InputException;
14-
use Magento\Framework\Model\Entity\MetadataPool;
14+
use Magento\Framework\EntityManager\MetadataPool;
1515

1616
/**
1717
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

app/code/Magento/Bundle/Model/OptionRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Framework\Exception\CouldNotSaveException;
1212
use Magento\Framework\Exception\InputException;
1313
use Magento\Framework\Exception\NoSuchEntityException;
14-
use Magento\Framework\Model\Entity\MetadataPool;
14+
use Magento\Framework\EntityManager\MetadataPool;
1515

1616
/**
1717
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -64,7 +64,7 @@ class OptionRepository implements \Magento\Bundle\Api\ProductOptionRepositoryInt
6464
protected $dataObjectHelper;
6565

6666
/**
67-
* @var \Magento\Framework\Model\Entity\MetadataPool
67+
* @var \Magento\Framework\EntityManager\MetadataPool
6868
*/
6969
private $metadataPool;
7070

app/code/Magento/Bundle/Model/Product/ReadHandler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
namespace Magento\Bundle\Model\Product;
77

88
use Magento\Bundle\Api\ProductOptionRepositoryInterface as OptionRepository;
9+
use Magento\Framework\EntityManager\Operation\ExtensionInterface;
910

1011
/**
1112
* Class ReadHandler
1213
*/
13-
class ReadHandler
14+
class ReadHandler implements ExtensionInterface
1415
{
1516
/**
1617
* @var OptionRepository
@@ -30,10 +31,11 @@ public function __construct(OptionRepository $optionRepository)
3031
/**
3132
* @param string $entityType
3233
* @param object $entity
34+
* @param array $arguments
3335
* @return \Magento\Catalog\Api\Data\ProductInterface
3436
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3537
*/
36-
public function execute($entityType, $entity)
38+
public function execute($entityType, $entity, $arguments = [])
3739
{
3840
/** @var $entity \Magento\Catalog\Api\Data\ProductInterface */
3941
if ($entity->getTypeId() != \Magento\Bundle\Model\Product\Type::TYPE_CODE) {

app/code/Magento/Bundle/Model/Product/SaveHandler.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
namespace Magento\Bundle\Model\Product;
88

99
use Magento\Bundle\Api\ProductOptionRepositoryInterface as OptionRepository;
10-
use Magento\Framework\Model\Entity\MetadataPool;
11-
use Magento\Framework\Model\ResourceModel\Db\ProcessEntityRelationInterface;
10+
use Magento\Framework\EntityManager\MetadataPool;
1211
use Magento\Bundle\Api\ProductLinkManagementInterface;
12+
use Magento\Framework\EntityManager\Operation\ExtensionInterface;
1313

1414
/**
1515
* Class SaveHandler
1616
*/
17-
class SaveHandler
17+
class SaveHandler implements ExtensionInterface
1818
{
1919
/**
2020
* @var MetadataPool
@@ -49,10 +49,11 @@ public function __construct(
4949
/**
5050
* @param string $entityType
5151
* @param object $entity
52-
* @return object
52+
* @param array $arguments
53+
* @return \Magento\Catalog\Api\Data\ProductInterface|object
5354
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5455
*/
55-
public function execute($entityType, $entity)
56+
public function execute($entityType, $entity, $arguments = [])
5657
{
5758
$bundleProductOptions = $entity->getExtensionAttributes()->getBundleProductOptions();
5859
if ($entity->getTypeId() !== 'bundle' || empty($bundleProductOptions)) {

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null)
157157
'=?',
158158
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
159159
);
160-
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
160+
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
161161
$this->_addAttributeToSelect($select, 'status', "e.$linkField", 'cs.store_id', $statusCond, true);
162162
if ($this->moduleManager->isEnabled('Magento_Tax')) {
163163
$taxClassId = $this->_addAttributeToSelect($select, 'tax_class_id', "e.$linkField", 'cs.store_id');
@@ -404,7 +404,7 @@ protected function _calculateBundleSelectionPrice($priceType)
404404
);
405405
}
406406

407-
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
407+
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
408408
$select = $connection->select()->from(
409409
['i' => $this->_getBundlePriceTable()],
410410
['entity_id', 'customer_group_id', 'website_id']
@@ -484,7 +484,7 @@ protected function _prepareBundlePrice($entityIds = null)
484484
protected function _prepareTierPriceIndex($entityIds = null)
485485
{
486486
$connection = $this->getConnection();
487-
$linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
487+
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
488488
// remove index by bundle products
489489
$select = $connection->select()->from(
490490
['i' => $this->_getTierPriceIndexTable()],

0 commit comments

Comments
 (0)