Skip to content

Commit 4ee3bb3

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #19135: Calling getCurrentUrl on Store will wrongly add "___store" parameter #18941 (by @Nazar65) - #19302: fixed Notification page Select Visible items issue (by @shikhamis11) - magento-engcom/import-export-improvements#153: Added notes and tooltip to import behavior field in import form (by @federivo) - #18069: Add CatalogSearch no results handle (by @progreg) - #19080: [BUGFIX] Forward-port of #14861 for Magento 2.3 (by @kanduvisla) - #17806: 17754-Fixed validation while creating new product attributes in admin (by @saravananvelu) - #19839: Fixed minicart cancel button area overlapping issue (by @gelanivishal) - #19736: [Review] Integration tests for not allowed review submission (by @eduard13) - #19769: Minor typos corrected. (by @milindsingh) - #19762: Typo corrected Update bound-nodes.js (by @developerarun) - #19222: Cleaned up PriceCurrency class (by @dverkade) - #19537: Resolved bad parameter on function (by @jaimin-ktpl) - #19726: Typo "customet_id" to "customer_id" fixed. (by @milindsingh) - #19711: Check repository label for possible non-string value (by @poveu) - #19702: Small fix in classes (by @iskolesnyk) - #19634: Fixed - Lifetime update syntax error #13309 (by @ssp58bleuciel) - #19672: fix: simplify literal boolean checks (by @DanielRuf) - #19514: Fixed upgrade issue if manufacturer attribute not exist in the database (by @suneet64) - #19134: [Framework] New Link is not correctly shown as Current if contains default parts (by @eduard13) Fixed GitHub Issues: - #18941: Calling getCurrentUrl on Store will wrongly add "___store" parameter (reported by @LucaGallinari) has been fixed in #19135 by @Nazar65 in 2.3-develop branch Related commits: 1. 0e8cd9f 2. 300772d 3. b9a37ce 4. 1378074 5. 70d76c7 6. 2e5697d 7. b9f72f7 8. 22edbb9 9. 3c869e7 10. f1363cf - #19285: On Notification page Select All and Select Visible both works same (reported by @hellotaran) has been fixed in #19302 by @shikhamis11 in 2.3-develop branch Related commits: 1. 58514a0 2. a4b989b 3. c805752 4. 4599646 5. daf5fb9 6. c23a55c 7. 9de0884 8. ac1355e 9. 77670fa 10. fad31c6 11. d2e5d87 - #18038: Add a custom layout handle when there are no search results (reported by @qsolutions-pl) has been fixed in #18069 by @progreg in 2.3-develop branch Related commits: 1. 23666ac 2. 158a0fd 3. d2c2c00 4. ac8d426 5. 258703c 6. ca8b15b 7. c1cbd00 - #14861: M2.2.3 : Unexpected behaviour when programmatically assigning products to a category (reported by @kanduvisla) has been fixed in #19080 by @kanduvisla in 2.3-develop branch Related commits: 1. 3905580 2. c2100db 3. d904697 4. 9b919f9 5. 9cb7a89 - #17754: Misleading error in Add Product Attribute screen (reported by @milossh) has been fixed in #17806 by @saravananvelu in 2.3-develop branch Related commits: 1. 90b1c76 2. 22c185e - #19836: Minicart cancel button area overlapping to cart subtotal label (reported by @cedarvinda) has been fixed in #19839 by @gelanivishal in 2.3-develop branch Related commits: 1. fca6649 2. d4ebf75 - #17442: Order getCreatedAtFormatted has bad params (reported by @patoch14) has been fixed in #19537 by @jaimin-ktpl in 2.3-develop branch Related commits: 1. 4a1d103 - #19721: Typo in SalesRule/Model/ResourceModel/Coupon/Usage.php (reported by @Delwin444) has been fixed in #19726 by @milindsingh in 2.3-develop branch Related commits: 1. a2bac04 - #13309: Lifetime update syntax error (reported by @navalnichnik) has been fixed in #19634 by @ssp58bleuciel in 2.3-develop branch Related commits: 1. 146f74a 2. 70056f5 - #19099: New Link is not correctly shown as Current if contains default parts (reported by @eduard13) has been fixed in #19134 by @eduard13 in 2.3-develop branch Related commits: 1. 29640f1 2. fea9aaf 3. 508832b 4. 769e46d 5. 4241175 6. 3ee9190 7. 2f8314c 8. 64daebd 9. a912d27
2 parents 9cb874f + a703ac5 commit 4ee3bb3

File tree

38 files changed

+670
-136
lines changed

38 files changed

+670
-136
lines changed

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;
88

99
/**
10+
* Media synchronization error message class.
11+
*
1012
* @api
1113
* @since 100.0.2
1214
*/
@@ -27,7 +29,7 @@ class Error extends \Magento\AdminNotification\Model\System\Message\Media\Abstra
2729
protected function _shouldBeDisplayed()
2830
{
2931
$data = $this->_syncFlag->getFlagData();
30-
return isset($data['has_errors']) && true == $data['has_errors'];
32+
return !empty($data['has_errors']);
3133
}
3234

3335
/**

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Success.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;
77

88
/**
9+
* Media synchronization success message class.
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -27,8 +29,8 @@ protected function _shouldBeDisplayed()
2729
{
2830
$state = $this->_syncFlag->getState();
2931
$data = $this->_syncFlag->getFlagData();
30-
$hasErrors = isset($data['has_errors']) && true == $data['has_errors'] ? true : false;
31-
return false == $hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
32+
$hasErrors = !empty($data['has_errors']);
33+
return !$hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
3234
}
3335

3436
/**

app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
7676
$columnName = $this->nameResolver->getName($attributeData);
7777
if (isset($attributeData['function'])) {
7878
$prefix = '';
79-
if (isset($attributeData['distinct']) && $attributeData['distinct'] == true) {
79+
if (!empty($attributeData['distinct'])) {
8080
$prefix = ' DISTINCT ';
8181
}
8282
$expression = new ColumnValueExpression(

app/code/Magento/Analytics/Test/Unit/Model/ExportDataHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
191191
->with(
192192
$archiveSource,
193193
$archiveAbsolutePath,
194-
$isArchiveSourceDirectory ? true : false
194+
$isArchiveSourceDirectory
195195
);
196196

197197
$fileContent = 'Some text';
@@ -222,7 +222,7 @@ public function prepareExportDataDataProvider()
222222
{
223223
return [
224224
'Data source for archive is directory' => [true],
225-
'Data source for archive doesn\'t directory' => [false],
225+
'Data source for archive isn\'t directory' => [false],
226226
];
227227
}
228228

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
namespace Magento\Backend\Block\Widget\Form\Element;
8+
79
/**
810
* Form element dependencies mapper
911
* Assumes that one element may depend on other element values.
1012
* Will toggle as "enabled" only if all elements it depends from toggle as true.
11-
*/
12-
namespace Magento\Backend\Block\Widget\Form\Element;
13-
14-
/**
13+
*
1514
* @api
1615
* @since 100.0.2
1716
*/
@@ -117,6 +116,7 @@ public function addConfigOptions(array $options)
117116

118117
/**
119118
* HTML output getter
119+
*
120120
* @return string
121121
*/
122122
protected function _toHtml()
@@ -139,7 +139,8 @@ protected function _toHtml()
139139
}
140140

141141
/**
142-
* Field dependences JSON map generator
142+
* Field dependencies JSON map generator
143+
*
143144
* @return string
144145
*/
145146
protected function _getDependsJson()

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Backend\Block\Widget\Grid\Massaction;
88

99
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
10+
use Magento\Framework\Data\Collection\AbstractDb;
1011
use Magento\Framework\DataObject;
1112

1213
/**
@@ -52,7 +53,7 @@ public function __construct(
5253
}
5354

5455
/**
55-
* @return void
56+
* @inheritdoc
5657
*/
5758
protected function _construct()
5859
{
@@ -217,6 +218,7 @@ public function getGridJsObjectName()
217218
* Retrieve JSON string of selected checkboxes
218219
*
219220
* @return string
221+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
220222
*/
221223
public function getSelectedJson()
222224
{
@@ -231,6 +233,7 @@ public function getSelectedJson()
231233
* Retrieve array of selected checkboxes
232234
*
233235
* @return string[]
236+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
234237
*/
235238
public function getSelected()
236239
{
@@ -252,6 +255,8 @@ public function getApplyButtonHtml()
252255
}
253256

254257
/**
258+
* Get mass action javascript code.
259+
*
255260
* @return string
256261
*/
257262
public function getJavaScript()
@@ -268,6 +273,8 @@ public function getJavaScript()
268273
}
269274

270275
/**
276+
* Get grid ids in JSON format.
277+
*
271278
* @return string
272279
*/
273280
public function getGridIdsJson()
@@ -284,6 +291,11 @@ public function getGridIdsJson()
284291
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
285292
}
286293

294+
if ($allIdsCollection instanceof AbstractDb) {
295+
$allIdsCollection->getSelect()->limit();
296+
$allIdsCollection->clear();
297+
}
298+
287299
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
288300
if (!empty($gridIds)) {
289301
return join(",", $gridIds);
@@ -292,6 +304,8 @@ public function getGridIdsJson()
292304
}
293305

294306
/**
307+
* Get Html id.
308+
*
295309
* @return string
296310
*/
297311
public function getHtmlId()

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useR
198198
}
199199

200200
/**
201+
* Get selection price list provider.
202+
*
201203
* @return SelectionPriceListProviderInterface
202204
* @deprecated 100.2.0
203205
*/
@@ -281,7 +283,7 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio
281283
* @param float $basePriceValue
282284
* @param Product $bundleProduct
283285
* @param \Magento\Bundle\Pricing\Price\BundleSelectionPrice[] $selectionPriceList
284-
* @param null|bool|string|arrayy $exclude
286+
* @param null|bool|string|array $exclude
285287
* @return \Magento\Framework\Pricing\Amount\AmountInterface
286288
*/
287289
protected function calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude)

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function testSaveData($skus, $bunch, $allowImport)
242242
'price_type' => 'fixed',
243243
'shipment_type' => '1',
244244
'default_qty' => '1',
245-
'is_defaul' => '1',
245+
'is_default' => '1',
246246
'position' => '1',
247247
'option_id' => '1']
248248
]
@@ -264,7 +264,7 @@ public function testSaveData($skus, $bunch, $allowImport)
264264
'price_type' => 'percent',
265265
'shipment_type' => 0,
266266
'default_qty' => '2',
267-
'is_defaul' => '1',
267+
'is_default' => '1',
268268
'position' => '6',
269269
'option_id' => '6']
270270
]
@@ -324,7 +324,7 @@ public function saveDataProvider()
324324
. 'price_type=fixed,'
325325
. 'shipment_type=separately,'
326326
. 'default_qty=1,'
327-
. 'is_defaul=1,'
327+
. 'is_default=1,'
328328
. 'position=1,'
329329
. 'option_id=1 | name=Bundle2,'
330330
. 'type=dropdown,'
@@ -333,7 +333,7 @@ public function saveDataProvider()
333333
. 'price=10,'
334334
. 'price_type=fixed,'
335335
. 'default_qty=1,'
336-
. 'is_defaul=1,'
336+
. 'is_default=1,'
337337
. 'position=2,'
338338
. 'option_id=2'
339339
],

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ public function execute()
197197
$attributeCode = $attributeCode ?: $this->generateCode($this->getRequest()->getParam('frontend_label')[0]);
198198
if (strlen($attributeCode) > 0) {
199199
$validatorAttrCode = new \Zend_Validate_Regex(
200-
['pattern' => '/^[a-z\x{600}-\x{6FF}][a-z\x{600}-\x{6FF}_0-9]{0,30}$/u']
200+
['pattern' => '/^[a-zA-Z\x{600}-\x{6FF}][a-zA-Z\x{600}-\x{6FF}_0-9]{0,30}$/u']
201201
);
202202
if (!$validatorAttrCode->isValid($attributeCode)) {
203203
$this->messageManager->addErrorMessage(
204204
__(
205-
'Attribute code "%1" is invalid. Please use only letters (a-z), ' .
205+
'Attribute code "%1" is invalid. Please use only letters (a-z or A-Z), ' .
206206
'numbers (0-9) or underscore(_) in this field, first character should be a letter.',
207207
$attributeCode
208208
)

app/code/Magento/Catalog/Model/ResourceModel/Product/CategoryLink.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,15 @@ private function processCategoryLinks($newCategoryPositions, &$oldCategoryPositi
118118
$result = ['changed' => [], 'updated' => []];
119119

120120
$oldCategoryPositions = array_values($oldCategoryPositions);
121-
$oldCategoryList = array_column($oldCategoryPositions, 'category_id');
122121
foreach ($newCategoryPositions as $newCategoryPosition) {
123-
$key = array_search($newCategoryPosition['category_id'], $oldCategoryList);
122+
$key = false;
123+
124+
foreach ($oldCategoryPositions as $oldKey => $oldCategoryPosition) {
125+
if ((int)$oldCategoryPosition['category_id'] === (int)$newCategoryPosition['category_id']) {
126+
$key = $oldKey;
127+
break;
128+
}
129+
}
124130

125131
if ($key === false) {
126132
$result['changed'][] = $newCategoryPosition;

0 commit comments

Comments
 (0)