Skip to content

Commit 086de38

Browse files
merge magento/2.3-develop into magento-pangolin/mtf-eol-pr
2 parents b53c075 + 062662d commit 086de38

File tree

51 files changed

+1184
-378
lines changed

Some content is hidden

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

51 files changed

+1184
-378
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
113113
<label>Debug</label>
114114
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
115-
<label>Enabled Template Path Hints for Storefront</label>
115+
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118118
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
@@ -132,7 +132,7 @@
132132
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
133133
</field>
134134
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
135-
<label>Enabled Template Path Hints for Admin</label>
135+
<label>Enable Template Path Hints for Admin</label>
136136
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
137137
</field>
138138
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,10 +644,11 @@ public function delete(ProductInterface $product)
644644
unset($this->instancesById[$product->getId()]);
645645
$this->resourceModel->delete($product);
646646
} catch (ValidatorException $e) {
647-
throw new CouldNotSaveException(__($e->getMessage()));
647+
throw new CouldNotSaveException(__($e->getMessage()), $e);
648648
} catch (\Exception $e) {
649649
throw new \Magento\Framework\Exception\StateException(
650-
__('The "%1" product couldn\'t be removed.', $sku)
650+
__('The "%1" product couldn\'t be removed.', $sku),
651+
$e
651652
);
652653
}
653654
$this->removeProductFromLocalCache($sku);

app/code/Magento/Catalog/Pricing/Price/MinimalTierPriceCalculator.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public function __construct(CalculatorInterface $calculator)
2929
}
3030

3131
/**
32-
* Get raw value of "as low as" as a minimal among tier prices
33-
* {@inheritdoc}
32+
* Get raw value of "as low as" as a minimal among tier prices{@inheritdoc}
33+
*
34+
* @param SaleableInterface $saleableItem
35+
* @return float|null
3436
*/
3537
public function getValue(SaleableInterface $saleableItem)
3638
{
@@ -49,15 +51,17 @@ public function getValue(SaleableInterface $saleableItem)
4951
}
5052

5153
/**
52-
* Return calculated amount object that keeps "as low as" value
53-
* {@inheritdoc}
54+
* Return calculated amount object that keeps "as low as" value{@inheritdoc}
55+
*
56+
* @param SaleableInterface $saleableItem
57+
* @return AmountInterface|null
5458
*/
5559
public function getAmount(SaleableInterface $saleableItem)
5660
{
5761
$value = $this->getValue($saleableItem);
5862

5963
return $value === null
6064
? null
61-
: $this->calculator->getAmount($value, $saleableItem);
65+
: $this->calculator->getAmount($value, $saleableItem, 'tax');
6266
}
6367
}

app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
$label = $block->getChildData($alias, 'title');
2323
?>
2424
<div class="data item title"
25-
aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"
2625
data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
2726
<a class="data switch"
2827
tabindex="-1"
29-
data-toggle="switch"
28+
data-toggle="trigger"
3029
href="#<?= /* @escapeNotVerified */ $alias ?>"
3130
id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">
3231
<?= /* @escapeNotVerified */ $label ?>
3332
</a>
3433
</div>
35-
<div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
34+
<div class="data item content"
35+
aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
3636
<?= /* @escapeNotVerified */ $html ?>
3737
</div>
3838
<?php endforeach;?>

app/code/Magento/Checkout/Controller/Cart/Addgroup.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Checkout\Controller\Cart;
89

910
use Magento\Checkout\Model\Cart as CustomerCart;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
1012
use Magento\Framework\Escaper;
1113
use Magento\Framework\App\ObjectManager;
1214
use Magento\Sales\Model\Order\Item;
1315

1416
/**
17+
* Add grouped items controller.
18+
*
1519
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1620
*/
17-
class Addgroup extends \Magento\Checkout\Controller\Cart
21+
class Addgroup extends \Magento\Checkout\Controller\Cart implements HttpPostActionInterface
1822
{
1923
/**
2024
* @var Escaper
@@ -44,6 +48,8 @@ public function __construct(
4448
}
4549

4650
/**
51+
* Add items in group.
52+
*
4753
* @return \Magento\Framework\Controller\Result\Redirect
4854
*/
4955
public function execute()
@@ -74,6 +80,8 @@ public function execute()
7480
}
7581
}
7682
$this->cart->save();
83+
} else {
84+
$this->messageManager->addErrorMessage(__('Please select at least one product to add to cart'));
7785
}
7886
return $this->_goBack();
7987
}

app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
method="post"
1515
id="form-validate"
1616
data-mage-init='{"Magento_Checkout/js/action/update-shopping-cart":
17-
{"validationURL" : "/checkout/cart/updateItemQty"}
17+
{"validationURL" : "/checkout/cart/updateItemQty",
18+
"updateCartActionContainer": "#update_cart_action_container"}
1819
}'
1920
class="form form-cart">
2021
<?= $block->getBlockHtml('formkey') ?>

app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ define([
1414
$.widget('mage.updateShoppingCart', {
1515
options: {
1616
validationURL: '',
17-
eventName: 'updateCartItemQty'
17+
eventName: 'updateCartItemQty',
18+
updateCartActionContainer: ''
1819
},
1920

2021
/** @inheritdoc */
@@ -31,7 +32,9 @@ define([
3132
* @return {Boolean}
3233
*/
3334
onSubmit: function (event) {
34-
if (!this.options.validationURL) {
35+
var action = this.element.find(this.options.updateCartActionContainer).val();
36+
37+
if (!this.options.validationURL || action === 'empty_cart') {
3538
return true;
3639
}
3740

app/code/Magento/CustomerGraphQl/Model/Customer/CheckCustomerAccount.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
use Magento\Customer\Api\AccountManagementInterface;
1212
use Magento\Customer\Api\CustomerRepositoryInterface;
1313
use Magento\Customer\Model\AuthenticationInterface;
14+
use Magento\Framework\Exception\LocalizedException;
1415
use Magento\Framework\Exception\NoSuchEntityException;
1516
use Magento\Framework\GraphQl\Exception\GraphQlAuthenticationException;
1617
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
18+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1719
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
1820

1921
/**
@@ -58,6 +60,7 @@ public function __construct(
5860
* @param int|null $customerType
5961
* @return void
6062
* @throws GraphQlAuthorizationException
63+
* @throws GraphQlInputException
6164
* @throws GraphQlNoSuchEntityException
6265
* @throws GraphQlAuthenticationException
6366
*/
@@ -74,13 +77,20 @@ public function execute(?int $customerId, ?int $customerType): void
7477
__('Customer with id "%customer_id" does not exist.', ['customer_id' => $customerId]),
7578
$e
7679
);
80+
} catch (LocalizedException $e) {
81+
throw new GraphQlInputException(__($e->getMessage()));
7782
}
7883

7984
if (true === $this->authentication->isLocked($customerId)) {
8085
throw new GraphQlAuthenticationException(__('The account is locked.'));
8186
}
8287

83-
$confirmationStatus = $this->accountManagement->getConfirmationStatus($customerId);
88+
try {
89+
$confirmationStatus = $this->accountManagement->getConfirmationStatus($customerId);
90+
} catch (LocalizedException $e) {
91+
throw new GraphQlInputException(__($e->getMessage()));
92+
}
93+
8494
if ($confirmationStatus === AccountManagementInterface::ACCOUNT_CONFIRMATION_REQUIRED) {
8595
throw new GraphQlAuthenticationException(__("This account isn't confirmed. Verify and try again."));
8696
}

app/code/Magento/Fedex/Model/Carrier.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ public function setRequest(RateRequest $request)
363363

364364
if ($request->getDestPostcode()) {
365365
$r->setDestPostal($request->getDestPostcode());
366-
} else {
367366
}
368367

369368
if ($request->getDestCity()) {

app/code/Magento/GiftMessage/Block/Adminhtml/Sales/Order/View/Items.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function getMessage()
171171
/**
172172
* Retrieve save url
173173
*
174-
* @return array
174+
* @return string
175175
* @codeCoverageIgnore
176176
*/
177177
public function getSaveUrl()

0 commit comments

Comments
 (0)