Skip to content

Commit dcca458

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #16275: Simplified TypeProcessor (by @joni-jones) - #15842: [Forwardport] Add missing table aliases to fields mapping for Customer Group filter� (by @hitesh-wagento) - #15744: [Forwardport] [BUGFIX] #15564 Generated admin API token expires immediately (by @vijay-wagento) - #15726: Forwardport] Feature space between category page #1 (by @sanjay-wagento) - #15698: [Forwardport] Variant product image in sidebar wishlist block (by @dmytro-ch) - #15672: [FORWARDPORT #15097] Add field to filter to collection (by @dverkade) - #16256: #15255 unlock customer after password reset (by @vgelani) - #16246: [Forwardport] array_push(...) calls behaving as '$array[] = ...', $array[] = works faster than invoking functions in PHP (by @lfluvisotto) - #16224: [Forwardport] Correct return type of methods and typo correction. (by @saurabh-aureate) - #16225: Navigation dropdown caret icon. (by @tejash-wagento) - #15980: Use correct error message for duplicate error key in product import (by @denteblu) Fixed GitHub Issues: - #15822: SQL Error: ambiguous column 'customer_group_id' in 'All customers' page in admin when extension attribute table is joined (reported by @radio) has been fixed in #15842 by @hitesh-wagento in 2.3-develop branch Related commits: 1. 0f23ed7 - #15564: 2.2.4 Created admin token has no access (reported by @krukas) has been fixed in #15744 by @vijay-wagento in 2.3-develop branch Related commits: 1. 7f34b22 2. 349d178 - #12601: A space between the category page and the main footer when applying specific settings (reported by @wd7080) has been fixed in #15726 by @sanjay-wagento in 2.3-develop branch Related commits: 1. ce176d2 - #15255: Customer who exceeded max login failures not able to login even after reset password (reported by @tizzyguy87) has been fixed in #16256 by @vgelani in 2.3-develop branch Related commits: 1. a108233
2 parents 2697952 + 4bc0d18 commit dcca458

File tree

26 files changed

+328
-152
lines changed

26 files changed

+328
-152
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,12 @@ protected function checkUrlKeyDuplicates()
27152715
);
27162716
foreach ($urlKeyDuplicates as $entityData) {
27172717
$rowNum = $this->rowNumbers[$entityData['store_id']][$entityData['request_path']];
2718-
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum);
2718+
$message = sprintf(
2719+
$this->retrieveMessageTemplate(ValidatorInterface::ERROR_DUPLICATE_URL_KEY),
2720+
$entityData['request_path'],
2721+
$entityData['sku']
2722+
);
2723+
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum, 'url_key', $message);
27192724
}
27202725
}
27212726
}

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Widget/CategoriesJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(Context $context, Registry $coreRegistry)
3232
/**
3333
* Initialize category object in registry
3434
*
35-
* @return Category
35+
* @return Category|bool
3636
*/
3737
protected function _initCategory()
3838
{

app/code/Magento/CatalogSearch/Model/ResourceModel/Engine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function processAttributeValue($attribute, $value)
120120
*
121121
* @param array $index
122122
* @param string $separator
123-
* @return string
123+
* @return array
124124
*/
125125
public function prepareEntityIndex($index, $separator = ' ')
126126
{

app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ protected function orderCountryOptions(array $countryOptions)
394394
]];
395395
foreach ($countryOptions as $countryOption) {
396396
if (empty($countryOption['value']) || in_array($countryOption['value'], $this->topCountryCodes)) {
397-
array_push($headOptions, $countryOption);
397+
$headOptions[] = $countryOption;
398398
} else {
399-
array_push($tailOptions, $countryOption);
399+
$tailOptions[] = $countryOption;
400400
}
401401
}
402402
return array_merge($headOptions, $tailOptions);

app/code/Magento/Checkout/Block/Checkout/DirectoryDataProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ private function orderCountryOptions(array $countryOptions)
141141
]];
142142
foreach ($countryOptions as $countryOption) {
143143
if (empty($countryOption['value']) || in_array($countryOption['value'], $topCountryCodes)) {
144-
array_push($headOptions, $countryOption);
144+
$headOptions[] = $countryOption;
145145
} else {
146-
array_push($tailOptions, $countryOption);
146+
$tailOptions[] = $countryOption;
147147
}
148148
}
149149
return array_merge($headOptions, $tailOptions);

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ public function resetPassword($email, $resetToken, $newPassword)
624624
$customerSecure->setRpToken(null);
625625
$customerSecure->setRpTokenCreatedAt(null);
626626
$customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
627+
$this->getAuthentication()->unlock($customer->getId());
627628
$this->sessionManager->destroy();
628629
$this->destroyCustomerSessions($customer->getId());
629630
$this->customerRepository->save($customer);

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,19 +353,19 @@
353353
<virtualType name="Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
354354
<arguments>
355355
<argument name="fieldMapping" xsi:type="array">
356-
<item name="code" xsi:type="string">customer_group_code</item>
357-
<item name="id" xsi:type="string">customer_group_id</item>
358-
<item name="tax_class_name" xsi:type="string">class_name</item>
356+
<item name="code" xsi:type="string">main_table.customer_group_code</item>
357+
<item name="id" xsi:type="string">main_table.customer_group_id</item>
358+
<item name="tax_class_name" xsi:type="string">tax_class_table.class_name</item>
359359
</argument>
360360
</arguments>
361361
</virtualType>
362362
<!-- @api -->
363363
<virtualType name="Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
364364
<arguments>
365365
<argument name="fieldMapping" xsi:type="array">
366-
<item name="code" xsi:type="string">customer_group_code</item>
367-
<item name="id" xsi:type="string">customer_group_id</item>
368-
<item name="tax_class_name" xsi:type="string">class_name</item>
366+
<item name="code" xsi:type="string">main_table.customer_group_code</item>
367+
<item name="id" xsi:type="string">main_table.customer_group_id</item>
368+
<item name="tax_class_name" xsi:type="string">tax_class_table.class_name</item>
369369
</argument>
370370
<argument name="defaultOrders" xsi:type="array">
371371
<item name="id" xsi:type="string">ASC</item>

app/code/Magento/Deploy/Package/Processor/PreProcessor/Less.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private function buildMap($filePath, $packagePath, $contentType)
188188
if (!isset($this->map[$filePath])) {
189189
$this->map[$filePath] = [];
190190
}
191-
array_push($this->map[$filePath], $resolvedMapPath);
191+
$this->map[$filePath][] = $resolvedMapPath;
192192
$this->buildMap($resolvedMapPath, $packagePath, $contentType);
193193
};
194194
if ($content) {

app/code/Magento/ImportExport/Model/Report/Csv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function createReport(
7777
$outputCsv = $this->createOutputCsvModel($outputFileName);
7878

7979
$columnsName = $sourceCsv->getColNames();
80-
array_push($columnsName, self::REPORT_ERROR_COLUMN_NAME);
80+
$columnsName[] = self::REPORT_ERROR_COLUMN_NAME;
8181
$outputCsv->setHeaderCols($columnsName);
8282

8383
foreach ($sourceCsv as $rowNum => $rowData) {

app/code/Magento/Quote/Model/Quote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ public function getErrors()
20212021
foreach ($this->getMessages() as $message) {
20222022
/* @var $error \Magento\Framework\Message\AbstractMessage */
20232023
if ($message->getType() == \Magento\Framework\Message\MessageInterface::TYPE_ERROR) {
2024-
array_push($errors, $message);
2024+
$errors[] = $message;
20252025
}
20262026
}
20272027
return $errors;

app/code/Magento/Sales/Setup/Patch/Data/FillQuoteAddressIdInSalesOrderAddress.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,27 @@ public function apply()
9393
public function fillQuoteAddressIdInSalesOrderAddress()
9494
{
9595
$addressCollection = $this->addressCollectionFactory->create();
96+
$addressCollection->addFieldToFilter('quote_address_id', ['null' => true]);
97+
9698
/** @var \Magento\Sales\Model\Order\Address $orderAddress */
9799
foreach ($addressCollection as $orderAddress) {
98-
if (!$orderAddress->getData('quote_address_id')) {
99-
$orderId = $orderAddress->getParentId();
100-
$addressType = $orderAddress->getAddressType();
101-
102-
/** @var \Magento\Sales\Model\Order $order */
103-
$order = $this->orderFactory->create()->load($orderId);
104-
$quoteId = $order->getQuoteId();
105-
$quote = $this->quoteFactory->create()->load($quoteId);
106-
107-
if ($addressType == \Magento\Sales\Model\Order\Address::TYPE_SHIPPING) {
108-
$quoteAddressId = $quote->getShippingAddress()->getId();
109-
$orderAddress->setData('quote_address_id', $quoteAddressId);
110-
} elseif ($addressType == \Magento\Sales\Model\Order\Address::TYPE_BILLING) {
111-
$quoteAddressId = $quote->getBillingAddress()->getId();
112-
$orderAddress->setData('quote_address_id', $quoteAddressId);
113-
}
114-
115-
$orderAddress->save();
100+
$orderId = $orderAddress->getParentId();
101+
$addressType = $orderAddress->getAddressType();
102+
103+
/** @var \Magento\Sales\Model\Order $order */
104+
$order = $this->orderFactory->create()->load($orderId);
105+
$quoteId = $order->getQuoteId();
106+
$quote = $this->quoteFactory->create()->load($quoteId);
107+
108+
if ($addressType == \Magento\Sales\Model\Order\Address::TYPE_SHIPPING) {
109+
$quoteAddressId = $quote->getShippingAddress()->getId();
110+
$orderAddress->setData('quote_address_id', $quoteAddressId);
111+
} elseif ($addressType == \Magento\Sales\Model\Order\Address::TYPE_BILLING) {
112+
$quoteAddressId = $quote->getBillingAddress()->getId();
113+
$orderAddress->setData('quote_address_id', $quoteAddressId);
116114
}
115+
116+
$orderAddress->save();
117117
}
118118
}
119119

app/code/Magento/SalesRule/Model/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public function sortItemsByPriority($items, Address $address = null)
506506
foreach ($items as $itemKey => $itemValue) {
507507
if ($rule->getActions()->validate($itemValue)) {
508508
unset($items[$itemKey]);
509-
array_push($itemsSorted, $itemValue);
509+
$itemsSorted[] = $itemValue;
510510
}
511511
}
512512
}

app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function getUrlRewriteId()
7979

8080
/**
8181
* @param int $urlRewriteId
82-
* @return int
82+
* @return $this
8383
*/
8484
public function setUrlRewriteId($urlRewriteId)
8585
{

app/code/Magento/User/Model/Backend/Config/ObserverConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getAdminPasswordLifetime()
7272
}
7373

7474
/**
75-
* Get admin maxiumum security failures from config
75+
* Get admin maximum security failures from config
7676
*
7777
* @return int
7878
*/

app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ private function isTokenExpired(Token $token): bool
132132
// other user-type tokens are considered always valid
133133
return false;
134134
}
135+
136+
if (empty($tokenTtl)) {
137+
return false;
138+
}
139+
135140
if ($this->dateTime->strToTime($token->getCreatedAt()) < ($this->date->gmtTimestamp() - $tokenTtl * 3600)) {
136141
return true;
137142
}

app/code/Magento/Wishlist/CustomerData/Wishlist.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ protected function getItemData(\Magento\Wishlist\Model\Item $wishlistItem)
149149
*/
150150
protected function getImageData($product)
151151
{
152+
/*Set variant product if it is configurable product.
153+
It will show variant product image in sidebar instead of configurable product image.*/
154+
$simpleOption = $product->getCustomOption('simple_product');
155+
if ($simpleOption !== null) {
156+
$optionProduct = $simpleOption->getProduct();
157+
$product = $optionProduct;
158+
}
159+
152160
/** @var \Magento\Catalog\Helper\Image $helper */
153161
$helper = $this->imageHelperFactory->create()
154162
->init($product, 'wishlist_sidebar_block');

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,16 @@
507507
}
508508
}
509509

510+
//
511+
// Category page 1 column layout
512+
// ---------------------------------------------
513+
514+
.catalog-category-view.page-layout-1column {
515+
.column.main {
516+
min-height: inherit;
517+
}
518+
}
519+
510520
}
511521

512522
//

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,16 @@
747747
}
748748
}
749749
}
750+
751+
//
752+
// Category page 1 column layout
753+
// ---------------------------------------------
754+
755+
.catalog-category-view.page-layout-1column {
756+
.column.main {
757+
min-height: inherit;
758+
}
759+
}
750760
}
751761

752762
//

lib/internal/Magento/Framework/Reflection/Test/Unit/DataObject.php

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Framework\Reflection\Test\Unit;
77

8+
use Magento\Framework\Reflection\Test\Unit\Fixture\TSampleInterface;
9+
810
/**
911
* Dummy data object to be used by TypeProcessorTest
1012
*/
@@ -13,18 +15,23 @@ class DataObject
1315
/**
1416
* @var string
1517
*/
16-
protected $attrName;
18+
private $attrName;
1719

1820
/**
1921
* @var bool
2022
*/
21-
protected $isActive;
23+
private $isActive;
2224

2325
/**
2426
* @var string
2527
*/
2628
private $name;
2729

30+
/**
31+
* @var array
32+
*/
33+
private $data = [];
34+
2835
/**
2936
* @return string
3037
*/
@@ -70,4 +77,32 @@ public function setName($name = null)
7077
$this->name = $name;
7178
return $this;
7279
}
80+
81+
/**
82+
* @param string $key Key is used as index
83+
* @param string $value
84+
* @return void
85+
*/
86+
public function setData(string $key, string $value)
87+
{
88+
$this->data[$key] = $value;
89+
}
90+
91+
/**
92+
* @param array $data
93+
* @return void
94+
*/
95+
public function addData(array $data)
96+
{
97+
$this->data = $data;
98+
}
99+
100+
/**
101+
* @param TSampleInterface[] $list
102+
* @return void
103+
*/
104+
public function addObjectList(array $list)
105+
{
106+
$this->data['objects'] = $list;
107+
}
73108
}

0 commit comments

Comments
 (0)