Skip to content

Commit 0f9a187

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop
- merged latest code from mainline branch
2 parents a7d030a + f62adcc commit 0f9a187

File tree

43 files changed

+438
-155
lines changed

Some content is hidden

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

43 files changed

+438
-155
lines changed

app/code/Magento/AmqpStore/Plugin/Framework/Amqp/Bulk/Exchange.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ public function beforeEnqueue(SubjectExchange $subject, $topic, array $envelopes
9191
if ($headers instanceof AMQPTable) {
9292
try {
9393
$headers->set('store_id', $storeId);
94-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
9594
} catch (AMQPInvalidArgumentException $ea) {
9695
$errorMessage = sprintf("Can't set storeId to amqp message. Error %s.", $ea->getMessage());
9796
$this->logger->error($errorMessage);

app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public function execute()
127127
$adminSession->destroy();
128128

129129
$response->setRedirectUrl($this->getUrl('*'));
130-
// phpcs:disable Magento2.Exceptions.ThrowCatch
131130
} catch (\Magento\Framework\Backup\Exception\CantLoadSnapshot $e) {
132131
$errorMsg = __('We can\'t find the backup file.');
133132
} catch (\Magento\Framework\Backup\Exception\FtpConnectionFailed $e) {

app/code/Magento/Bundle/Plugin/UpdatePriceInQuoteItemOptions.php

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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="BundleProductWithTierPriceInCartTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Check that price of cart is correct when the bundle product added to the cart twice"/>
14+
<title value="Customer should get the right subtotal in cart when the bundle product added to the cart twice"/>
15+
<description value="Customer should be able to add one more bundle product to the cart and get the right price"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-19727"/>
18+
<group value="bundle"/>
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
23+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
<actionGroup ref="StorefrontSignOutActionGroup" stepKey="StorefrontSignOutActionGroup"/>
29+
<actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid">
30+
<argument name="product" value="BundleProduct"/>
31+
</actionGroup>
32+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFiltersAfter"/>
33+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
34+
<argument name="customerEmail" value="CustomerEntityOne.email"/>
35+
</actionGroup>
36+
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/>
37+
</after>
38+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
39+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
40+
<actionGroup ref="fillMainBundleProductForm" stepKey="fillMainFieldsForBundle"/>
41+
<actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOption1">
42+
<argument name="x" value="0"/>
43+
<argument name="n" value="1"/>
44+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
45+
<argument name="prodTwoSku" value=""/>
46+
<argument name="optionTitle" value="Option1"/>
47+
<argument name="inputType" value="checkbox"/>
48+
</actionGroup>
49+
<actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOption2">
50+
<argument name="x" value="1"/>
51+
<argument name="n" value="2"/>
52+
<argument name="prodOneSku" value="$$simpleProduct2.sku$$"/>
53+
<argument name="prodTwoSku" value=""/>
54+
<argument name="optionTitle" value="Option2"/>
55+
<argument name="inputType" value="checkbox"/>
56+
</actionGroup>
57+
<scrollToTopOfPage stepKey="scrollTopPageProduct"/>
58+
<actionGroup ref="ProductSetAdvancedPricing" stepKey="addTierPriceProduct">
59+
<argument name="group" value="ALL GROUPS"/>
60+
<argument name="quantity" value="1"/>
61+
<argument name="price" value="Discount"/>
62+
<argument name="amount" value="50"/>
63+
</actionGroup>
64+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser">
65+
<argument name="Customer" value="CustomerEntityOne"/>
66+
</actionGroup>
67+
<amOnPage url="{{StorefrontProductPage.url(BundleProduct.urlKey)}}" stepKey="goToStorefront"/>
68+
<waitForPageLoad stepKey="waitForStorefront"/>
69+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickOnCustomizeAndAddToCartButton"/>
70+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
71+
<argument name="quantity" value="1"/>
72+
</actionGroup>
73+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCartAgain">
74+
<argument name="quantity" value="1"/>
75+
</actionGroup>
76+
<actionGroup ref="AssertSubTotalOnStorefrontMiniCartActionGroup" stepKey="assertSubTotalOnStorefrontMiniCart">
77+
<argument name="subTotal" value="$246.00"/>
78+
</actionGroup>
79+
</test>
80+
</tests>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@
123123
</argument>
124124
</arguments>
125125
</type>
126-
<type name="Magento\Quote\Model\Quote\Item">
127-
<plugin name="update_price_for_bundle_in_quote_item_option" type="Magento\Bundle\Plugin\UpdatePriceInQuoteItemOptions"/>
128-
</type>
129126
<type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
130127
<plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/>
131128
</type>

app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ public function create($sku, ProductAttributeMediaGalleryEntryInterface $entry)
7171
$product->setMediaGalleryEntries($existingMediaGalleryEntries);
7272
try {
7373
$product = $this->productRepository->save($product);
74-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
7574
} catch (InputException $inputException) {
7675
throw $inputException;
77-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
7876
} catch (\Exception $e) {
7977
throw new StateException(__("The product can't be saved."));
8078
}

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ private function getCollectionProcessor()
735735
{
736736
if (!$this->collectionProcessor) {
737737
$this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
738-
'Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor'
738+
\Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor::class
739739
);
740740
}
741741
return $this->collectionProcessor;
@@ -845,7 +845,6 @@ private function saveProduct($product): void
845845
throw new CouldNotSaveException(__($e->getMessage()));
846846
} catch (LocalizedException $e) {
847847
throw $e;
848-
// phpcs:disable Magento2.Exceptions.ThrowCatch
849848
} catch (\Exception $e) {
850849
throw new CouldNotSaveException(
851850
__('The product was unable to be saved. Please try again.'),

app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public function beforeSave()
193193
if ($this->_data[self::KEY_IS_GLOBAL] != $this->_origData[self::KEY_IS_GLOBAL]) {
194194
try {
195195
$this->attrLockValidator->validate($this);
196-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
197196
} catch (\Magento\Framework\Exception\LocalizedException $exception) {
198197
throw new \Magento\Framework\Exception\LocalizedException(
199198
__('Do not change the scope. %1', $exception->getMessage())

app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,8 @@ protected function _collectOptionMainData(
14581458
) {
14591459
if ($this->_isPriceGlobal) {
14601460
$prices[$nextOptionId][Store::DEFAULT_STORE_ID] = $priceData;
1461+
} else {
1462+
$prices[$nextOptionId][$this->_rowStoreId] = $priceData;
14611463
}
14621464
}
14631465

app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ public function createDirectory($name, $path)
447447
'id' => $this->_cmsWysiwygImages->convertPathToId($newPath),
448448
];
449449
return $result;
450-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
451450
} catch (\Magento\Framework\Exception\FileSystemException $e) {
452451
throw new \Magento\Framework\Exception\LocalizedException(__('We cannot create a new directory.'));
453452
}
@@ -474,7 +473,6 @@ public function deleteDirectory($path)
474473
$this->_deleteByPath($path);
475474
$path = $this->getThumbnailRoot() . $this->_getRelativePathToRoot($path);
476475
$this->_deleteByPath($path);
477-
// phpcs:ignore Magento2.Exceptions.ThrowCatch
478476
} catch (\Magento\Framework\Exception\FileSystemException $e) {
479477
throw new \Magento\Framework\Exception\LocalizedException(
480478
__('We cannot delete directory %1.', $this->_getRelativePathToRoot($path))

0 commit comments

Comments
 (0)