Skip to content

Commit 3e3f7fc

Browse files
author
Yaroslav Onischenko
committed
MAGETWO-66145: [Performance] PR processing
2 parents 602dd5b + ae331f5 commit 3e3f7fc

File tree

300 files changed

+2937
-4016
lines changed

Some content is hidden

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

300 files changed

+2937
-4016
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@
1616
<argument name="storage" xsi:type="object">Magento\Authorizenet\Model\Directpost\Session\Storage</argument>
1717
</arguments>
1818
</type>
19-
<type name="Magento\Config\Model\Config\Export\ExcludeList">
20-
<arguments>
21-
<argument name="configs" xsi:type="array">
22-
<item name="payment/authorizenet_directpost/login" xsi:type="string">1</item>
23-
<item name="payment/authorizenet_directpost/trans_key" xsi:type="string">1</item>
24-
<item name="payment/authorizenet_directpost/trans_md5" xsi:type="string">1</item>
25-
<item name="payment/authorizenet_directpost/merchant_email" xsi:type="string">1</item>
26-
</argument>
27-
</arguments>
28-
</type>
2919
<type name="Magento\Config\Model\Config\TypePool">
3020
<arguments>
3121
<argument name="sensitive" xsi:type="array">

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -171,24 +171,6 @@
171171
</argument>
172172
</arguments>
173173
</type>
174-
<type name="Magento\Config\Model\Config\Export\ExcludeList">
175-
<arguments>
176-
<argument name="configs" xsi:type="array">
177-
<item name="trans_email/ident_general/name" xsi:type="string">1</item>
178-
<item name="trans_email/ident_general/email" xsi:type="string">1</item>
179-
<item name="trans_email/ident_sales/name" xsi:type="string">1</item>
180-
<item name="trans_email/ident_sales/email" xsi:type="string">1</item>
181-
<item name="trans_email/ident_support/name" xsi:type="string">1</item>
182-
<item name="trans_email/ident_support/email" xsi:type="string">1</item>
183-
<item name="trans_email/ident_custom1/name" xsi:type="string">1</item>
184-
<item name="trans_email/ident_custom1/email" xsi:type="string">1</item>
185-
<item name="trans_email/ident_custom2/name" xsi:type="string">1</item>
186-
<item name="trans_email/ident_custom2/email" xsi:type="string">1</item>
187-
<item name="admin/url/custom" xsi:type="string">1</item>
188-
<item name="admin/url/custom_path" xsi:type="string">1</item>
189-
</argument>
190-
</arguments>
191-
</type>
192174
<type name="Magento\Config\Model\Config\TypePool">
193175
<arguments>
194176
<argument name="sensitive" xsi:type="array">

app/code/Magento/Braintree/Model/Paypal/Helper/QuoteUpdater.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,10 @@ private function updateAddressData(Address $address, array $addressData)
182182
$address->setRegionCode($addressData['region']);
183183
$address->setCountryId($addressData['countryCodeAlpha2']);
184184
$address->setPostcode($addressData['postalCode']);
185+
186+
// PayPal's address supposes not saving against customer account
187+
$address->setSaveInAddressBook(false);
188+
$address->setSameAsBilling(false);
189+
$address->setCustomerAddressId(null);
185190
}
186191
}

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -544,18 +544,6 @@
544544
</arguments>
545545
</type>
546546
<!-- END Settlement Report Section -->
547-
<type name="Magento\Config\Model\Config\Export\ExcludeList">
548-
<arguments>
549-
<argument name="configs" xsi:type="array">
550-
<item name="payment/braintree/merchant_id" xsi:type="string">1</item>
551-
<item name="payment/braintree/public_key" xsi:type="string">1</item>
552-
<item name="payment/braintree/private_key" xsi:type="string">1</item>
553-
<item name="payment/braintree/merchant_account_id" xsi:type="string">1</item>
554-
<item name="payment/braintree/kount_id" xsi:type="string">1</item>
555-
<item name="payment/braintree_paypal/merchant_name_override" xsi:type="string">1</item>
556-
</argument>
557-
</arguments>
558-
</type>
559547
<type name="Magento\Config\Model\Config\TypePool">
560548
<arguments>
561549
<argument name="sensitive" xsi:type="array">

app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,11 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,
316316

317317
foreach ($selectionPriceList as $selectionPrice) {
318318
++$i;
319-
$amountList[$i]['amount'] = $selectionPrice->getAmount();
320-
// always honor the quantity given
321-
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
319+
if ($selectionPrice) {
320+
$amountList[$i]['amount'] = $selectionPrice->getAmount();
321+
// always honor the quantity given
322+
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
323+
}
322324
}
323325

324326
/** @var Store $store */

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public function getDuplicateUrl()
249249
}
250250

251251
/**
252+
* @deprecated
252253
* @return string
253254
*/
254255
public function getHeader()

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,10 @@ public function getIsActiveAttributeId()
583583
*/
584584
public function findWhereAttributeIs($entityIdsFilter, $attribute, $expectedValue)
585585
{
586+
// @codingStandardsIgnoreStart
586587
$serializeData = $this->serializer->serialize($entityIdsFilter);
587588
$entityIdsFilterHash = md5($serializeData);
589+
// @codingStandardsIgnoreEnd
588590

589591
if (!isset($this->entitiesWhereAttributesIs[$entityIdsFilterHash][$attribute->getId()][$expectedValue])) {
590592
$linkField = $this->getLinkField();
@@ -767,7 +769,6 @@ public function getChildren($category, $recursive = true)
767769
$backendTable = $this->getTable([$this->getEntityTablePrefix(), 'int']);
768770
$connection = $this->getConnection();
769771
$checkSql = $connection->getCheckSql('c.value_id > 0', 'c.value', 'd.value');
770-
$linkField = $this->getLinkField();
771772
$bind = [
772773
'attribute_id' => $attributeId,
773774
'store_id' => $category->getStoreId(),

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@
4242
</argument>
4343
</arguments>
4444
</type>
45-
<type name="Magento\Config\Model\Config\Export\ExcludeList">
46-
<arguments>
47-
<argument name="configs" xsi:type="array">
48-
<item name="checkout/payment_failed/copy_to" xsi:type="string">1</item>
49-
</argument>
50-
</arguments>
51-
</type>
5245
<type name="Magento\Config\Model\Config\TypePool">
5346
<arguments>
5447
<argument name="sensitive" xsi:type="array">

app/code/Magento/Config/Console/Command/ConfigSet/ProcessorFacade.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
namespace Magento\Config\Console\Command\ConfigSet;
77

88
use Magento\Config\Console\Command\ConfigSetCommand;
9-
use Magento\Config\Model\Config\PathValidator;
109
use Magento\Framework\App\Scope\ValidatorInterface;
10+
use Magento\Config\Model\Config\PathValidator;
11+
use Magento\Framework\Exception\LocalizedException;
1112
use Magento\Framework\Exception\ConfigurationMismatchException;
1213
use Magento\Framework\Exception\CouldNotSaveException;
13-
use Magento\Framework\Exception\LocalizedException;
1414
use Magento\Framework\Exception\ValidatorException;
1515

1616
/**
@@ -21,7 +21,10 @@
2121
class ProcessorFacade
2222
{
2323
/**
24-
* The scope validator.
24+
* The scope and scope code validator.
25+
*
26+
* Checks if scope and scope code exist, and scope code belongs to scope.
27+
* For example, scope "websites" and scope code "base" exist, and scope code "base" belongs to scope "website".
2528
*
2629
* @var ValidatorInterface
2730
*/
@@ -30,6 +33,8 @@ class ProcessorFacade
3033
/**
3134
* The path validator.
3235
*
36+
* Checks whether the config path present in configuration structure.
37+
*
3338
* @var PathValidator
3439
*/
3540
private $pathValidator;
@@ -65,15 +70,18 @@ public function __construct(
6570
* @param string $scopeCode The scope code
6671
* @param boolean $lock The lock flag
6772
* @return string Processor response message
68-
* @throws LocalizedException If scope validation failed
69-
* @throws ValidatorException If path validation failed
70-
* @throws CouldNotSaveException If processing failed
73+
* @throws ValidatorException If some validation is wrong
74+
* @throws CouldNotSaveException If cannot save config value
7175
* @throws ConfigurationMismatchException If processor can not be instantiated
7276
*/
7377
public function process($path, $value, $scope, $scopeCode, $lock)
7478
{
75-
$this->scopeValidator->isValid($scope, $scopeCode);
76-
$this->pathValidator->validate($path);
79+
try {
80+
$this->scopeValidator->isValid($scope, $scopeCode);
81+
$this->pathValidator->validate($path);
82+
} catch (LocalizedException $exception) {
83+
throw new ValidatorException(__($exception->getMessage()), $exception);
84+
}
7785

7886
$processor = $lock
7987
? $this->configSetProcessorFactory->create(ConfigSetProcessorFactory::TYPE_LOCK)

app/code/Magento/Config/Console/Command/ConfigSetCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ protected function configure()
116116
protected function execute(InputInterface $input, OutputInterface $output)
117117
{
118118
try {
119+
$areaScope = $this->scope->getCurrentScope();
119120
// Emulating adminhtml scope to be able to read configs.
120121
$this->state->emulateAreaCode(Area::AREA_ADMINHTML, function () use ($input, $output) {
121122
$this->scope->setCurrentScope(Area::AREA_ADMINHTML);
@@ -131,6 +132,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
131132
$output->writeln('<info>' . $message . '</info>');
132133
});
133134

135+
$this->scope->setCurrentScope($areaScope);
136+
134137
return Cli::RETURN_SUCCESS;
135138
} catch (\Exception $exception) {
136139
$output->writeln('<error>' . $exception->getMessage() . '</error>');

0 commit comments

Comments
 (0)