Skip to content

Commit 60b14a4

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MC-15763-develop
2 parents 1501aae + 9473b31 commit 60b14a4

File tree

44 files changed

+1633
-623
lines changed

Some content is hidden

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

44 files changed

+1633
-623
lines changed

app/code/Magento/Catalog/Observer/SetSpecialPriceStartDate.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ public function execute(\Magento\Framework\Event\Observer $observer)
3838
{
3939
/** @var $product \Magento\Catalog\Model\Product */
4040
$product = $observer->getEvent()->getProduct();
41-
if ($product->getSpecialPrice() && ! $product->getSpecialFromDate()) {
41+
if ($product->getSpecialPrice() && $product->getSpecialFromDate() === null) {
4242
$product->setData('special_from_date', $this->localeDate->date()->setTime(0, 0));
4343
}
44-
4544
return $this;
4645
}
4746
}

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="DefaultLabel" type="input" selector="#attribute_label"/>
1414
<element name="InputType" type="select" selector="#frontend_input"/>
1515
<element name="ValueRequired" type="select" selector="#is_required"/>
16+
<element name="UpdateProductPreviewImage" type="select" selector="[name='update_product_preview_image']"/>
1617
<element name="AdvancedProperties" type="button" selector="#advanced_fieldset-wrapper"/>
1718
<element name="DefaultValue" type="input" selector="#default_value_text"/>
1819
<element name="Scope" type="select" selector="#is_global"/>

app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private function generateRequest($attributeType, $container, $useFulltext)
103103
}
104104
}
105105
/** @var $attribute Attribute */
106-
if (!$attribute->getIsSearchable() || in_array($attribute->getAttributeCode(), ['price', 'sku'], true)) {
106+
if (!$attribute->getIsSearchable() || in_array($attribute->getAttributeCode(), ['price'], true)) {
107107
// Some fields have their own specific handlers
108108
continue;
109109
}

app/code/Magento/CatalogSearch/Test/Unit/Model/Search/RequestGeneratorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Magento\CatalogSearch\Model\Search\RequestGenerator\GeneratorResolver;
1010
use Magento\CatalogSearch\Model\Search\RequestGenerator\GeneratorInterface;
1111

12+
/**
13+
* Test for \Magento\CatalogSearch\Model\Search\RequestGenerator
14+
*/
1215
class RequestGeneratorTest extends \PHPUnit\Framework\TestCase
1316
{
1417
/** @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager */
@@ -61,7 +64,7 @@ public function attributesProvider()
6164
return [
6265
[
6366
[
64-
'quick_search_container' => ['queries' => 0, 'filters' => 0, 'aggregations' => 0],
67+
'quick_search_container' => ['queries' => 1, 'filters' => 0, 'aggregations' => 0],
6568
'advanced_search_container' => ['queries' => 0, 'filters' => 0, 'aggregations' => 0],
6669
'catalog_view_container' => ['queries' => 0, 'filters' => 0, 'aggregations' => 0]
6770
],

app/code/Magento/CatalogSearch/etc/search_request.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<queryReference clause="must" ref="visibility"/>
2020
</query>
2121
<query xsi:type="matchQuery" value="$search_term$" name="search">
22-
<match field="sku"/>
2322
<match field="*"/>
2423
</query>
2524
<query xsi:type="filteredQuery" name="category">

app/code/Magento/Checkout/Model/ShippingInformationManagement.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ public function saveAddressInformation(
191191

192192
$shippingAddress = $quote->getShippingAddress();
193193

194-
if (!$shippingAddress->getShippingRateByCode($shippingAddress->getShippingMethod())) {
194+
if (!$quote->getIsVirtual()
195+
&& !$shippingAddress->getShippingRateByCode($shippingAddress->getShippingMethod())
196+
) {
195197
throw new NoSuchEntityException(
196198
__('Carrier with such method not found: %1, %2', $carrierCode, $methodCode)
197199
);

app/code/Magento/Customer/Controller/Account/CreatePassword.php

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Customer\Controller\Account;
79

810
use Magento\Customer\Api\AccountManagementInterface;
11+
use Magento\Customer\Model\ForgotPasswordToken\ConfirmCustomerByToken;
912
use Magento\Customer\Model\Session;
1013
use Magento\Framework\App\Action\HttpGetActionInterface;
1114
use Magento\Framework\View\Result\PageFactory;
1215
use Magento\Framework\App\Action\Context;
16+
use Magento\Framework\App\ObjectManager;
1317

1418
/**
1519
* Class CreatePassword
@@ -34,20 +38,30 @@ class CreatePassword extends \Magento\Customer\Controller\AbstractAccount implem
3438
protected $resultPageFactory;
3539

3640
/**
37-
* @param Context $context
38-
* @param Session $customerSession
39-
* @param PageFactory $resultPageFactory
40-
* @param AccountManagementInterface $accountManagement
41+
* @var \Magento\Customer\Model\ForgotPasswordToken\ConfirmCustomerByToken
42+
*/
43+
private $confirmByToken;
44+
45+
/**
46+
* @param \Magento\Framework\App\Action\Context $context
47+
* @param \Magento\Customer\Model\Session $customerSession
48+
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
49+
* @param \Magento\Customer\Api\AccountManagementInterface $accountManagement
50+
* @param \Magento\Customer\Model\ForgotPasswordToken\ConfirmCustomerByToken $confirmByToken
4151
*/
4252
public function __construct(
4353
Context $context,
4454
Session $customerSession,
4555
PageFactory $resultPageFactory,
46-
AccountManagementInterface $accountManagement
56+
AccountManagementInterface $accountManagement,
57+
ConfirmCustomerByToken $confirmByToken = null
4758
) {
4859
$this->session = $customerSession;
4960
$this->resultPageFactory = $resultPageFactory;
5061
$this->accountManagement = $accountManagement;
62+
$this->confirmByToken = $confirmByToken
63+
?? ObjectManager::getInstance()->get(ConfirmCustomerByToken::class);
64+
5165
parent::__construct($context);
5266
}
5367

@@ -67,6 +81,8 @@ public function execute()
6781
try {
6882
$this->accountManagement->validateResetPasswordLinkToken(null, $resetPasswordToken);
6983

84+
$this->confirmByToken->execute($resetPasswordToken);
85+
7086
if ($isDirectLink) {
7187
$this->session->setRpToken($resetPasswordToken);
7288
$resultRedirect = $this->resultRedirectFactory->create();
@@ -77,16 +93,17 @@ public function execute()
7793
/** @var \Magento\Framework\View\Result\Page $resultPage */
7894
$resultPage = $this->resultPageFactory->create();
7995
$resultPage->getLayout()
80-
->getBlock('resetPassword')
81-
->setResetPasswordLinkToken($resetPasswordToken);
96+
->getBlock('resetPassword')
97+
->setResetPasswordLinkToken($resetPasswordToken);
8298

8399
return $resultPage;
84100
}
85101
} catch (\Exception $exception) {
86-
$this->messageManager->addError(__('Your password reset link has expired.'));
102+
$this->messageManager->addErrorMessage(__('Your password reset link has expired.'));
87103
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
88104
$resultRedirect = $this->resultRedirectFactory->create();
89105
$resultRedirect->setPath('*/*/forgotpassword');
106+
90107
return $resultRedirect;
91108
}
92109
}

0 commit comments

Comments
 (0)