Skip to content

Commit a991619

Browse files
author
mastiuhin-olexandr
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-24495
2 parents a276405 + 05a3e7e commit a991619

File tree

97 files changed

+506
-272
lines changed

Some content is hidden

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

97 files changed

+506
-272
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,8 @@ private function fetchTierPrices(array $productIds): array
486486
)
487487
->where(
488488
'ap.' . $productEntityLinkField . ' IN (?)',
489-
$productIds
489+
$productIds,
490+
\Zend_Db::INT_TYPE
490491
);
491492

492493
if ($priceFromFilter !== null) {

app/code/Magento/Bundle/Model/ResourceModel/Selection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ public function getParentIdsByChild($childId)
145145
['e.entity_id as parent_product_id']
146146
)->where(
147147
$this->getMainTable() . '.product_id IN(?)',
148-
$childId
148+
$childId,
149+
\Zend_Db::INT_TYPE
149150
);
150151

151152
return $connection->fetchCol($select);

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundlePlaceOrderWithVirtualAndSimpleChildrenTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
<argument name="productId" value="$createFixedBundleProduct.id$"/>
4949
</actionGroup>
5050
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
51-
<!--Perform reindex and flush cache-->
52-
<actionGroup ref="AdminReindexAndFlushCache" stepKey="reindexAndFlushCache"/>
51+
<comment userInput="Adding the comment to replace AdminReindexAndFlushCache action group ('indexer:reindex', 'cache:flush' commands) for preserving Backward Compatibility" stepKey="reindexAndFlushCache"/>
5352
</before>
5453
<after>
5554
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProductForBundleItem"/>

app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,11 @@ protected function _copyRelationIndexData($parentIds, $excludeIds = null)
465465
[]
466466
)->where(
467467
'e.entity_id IN(?)',
468-
$parentIds
468+
$parentIds,
469+
\Zend_Db::INT_TYPE
469470
);
470471
if (!empty($excludeIds)) {
471-
$select->where('child_id NOT IN(?)', $excludeIds);
472+
$select->where('child_id NOT IN(?)', $excludeIds, \Zend_Db::INT_TYPE);
472473
}
473474

474475
$children = $this->getConnection()->fetchCol($select);
@@ -479,7 +480,8 @@ protected function _copyRelationIndexData($parentIds, $excludeIds = null)
479480
$this->getIndexTargetTableByDimension($dimensions)
480481
)->where(
481482
'entity_id IN(?)',
482-
$children
483+
$children,
484+
\Zend_Db::INT_TYPE
483485
);
484486
$query = $select->insertFromSelect($this->_defaultIndexerResource->getIdxTable(), [], false);
485487
$this->getConnection()->query($query);
@@ -578,13 +580,14 @@ private function getParentProductsTypes(array $productsIds)
578580
['e.entity_id as parent_id', 'type_id']
579581
)->where(
580582
'l.child_id IN(?)',
581-
$productsIds
583+
$productsIds,
584+
\Zend_Db::INT_TYPE
582585
);
583586
$pairs = $this->getConnection()->fetchPairs($select);
584587

585588
$byType = [];
586589
foreach ($pairs as $productId => $productType) {
587-
$byType[$productType][$productId] = $productId;
590+
$byType[$productType][$productId] = (int)$productId;
588591
}
589592

590593
return $byType;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function _clearUselessAttributeValues(\Magento\Framework\Model\Abstrac
101101
$attributeStoreIds = array_keys($this->_storeManager->getStores());
102102
if (!empty($attributeStoreIds)) {
103103
$delCondition = [
104-
'attribute_id = ?' => $object->getId(),
104+
'attribute_id = ?' => (int)$object->getId(),
105105
'store_id IN(?)' => $attributeStoreIds,
106106
];
107107
$this->getConnection()->delete($object->getBackendTable(), $delCondition);

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,8 @@ public function verifyIds(array $ids)
575575
'entity_id'
576576
)->where(
577577
'entity_id IN(?)',
578-
$ids
578+
$ids,
579+
\Zend_Db::INT_TYPE
579580
);
580581

581582
return $this->getConnection()->fetchCol($select);

app/code/Magento/Catalog/Model/ResourceModel/Url.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ protected function _getCategoryAttribute($attributeCode, $categoryIds, $storeId)
204204
['value' => $attributeCode, 'entity_id' => 'entity_id']
205205
)->where(
206206
'entity_id IN(?)',
207-
$categoryIds
207+
$categoryIds,
208+
\Zend_Db::INT_TYPE
208209
);
209210
} elseif ($this->_categoryAttributes[$attributeCode]['is_global'] || $storeId == 0) {
210211
$select->from(
@@ -216,7 +217,8 @@ protected function _getCategoryAttribute($attributeCode, $categoryIds, $storeId)
216217
['value']
217218
)->where(
218219
"t1.{$identifierFiled} IN(?)",
219-
$categoryIds
220+
$categoryIds,
221+
\Zend_Db::INT_TYPE
220222
)->where(
221223
'e.attribute_id = :attribute_id'
222224
)->where(
@@ -245,7 +247,8 @@ protected function _getCategoryAttribute($attributeCode, $categoryIds, $storeId)
245247
't1.attribute_id = :attribute_id'
246248
)->where(
247249
"e.entity_id IN(?)",
248-
$categoryIds
250+
$categoryIds,
251+
\Zend_Db::INT_TYPE
249252
)->group('e.entity_id');
250253

251254
$bind['attribute_id'] = $this->_categoryAttributes[$attributeCode]['attribute_id'];
@@ -308,7 +311,8 @@ public function _getProductAttribute($attributeCode, $productIds, $storeId)
308311
0
309312
)->where(
310313
'entity_id IN(?)',
311-
$productIds
314+
$productIds,
315+
\Zend_Db::INT_TYPE
312316
);
313317
} else {
314318
$valueExpr = $connection->getCheckSql('t2.value_id > 0', 't2.value', 't1.value');
@@ -326,7 +330,8 @@ public function _getProductAttribute($attributeCode, $productIds, $storeId)
326330
't1.attribute_id = :attribute_id'
327331
)->where(
328332
't1.entity_id IN(?)',
329-
$productIds
333+
$productIds,
334+
\Zend_Db::INT_TYPE
330335
);
331336
$bind['store_id'] = $storeId;
332337
}
@@ -430,7 +435,7 @@ protected function _getCategories($categoryIds, $storeId = null, $path = null)
430435

431436
// Prepare variables for checking whether categories belong to store
432437
if ($path === null) {
433-
$select->where('main_table.entity_id IN(?)', $categoryIds);
438+
$select->where('main_table.entity_id IN(?)', $categoryIds, \Zend_Db::INT_TYPE);
434439
} else {
435440
// Ensure that path ends with '/', otherwise we can get wrong results - e.g. $path = '1/2' will get '1/20'
436441
if (substr($path, -1) != '/') {
@@ -569,7 +574,7 @@ protected function _getProducts($productIds, $storeId, $entityId, &$lastEntityId
569574
$this->_productLimit
570575
);
571576
if ($productIds !== null) {
572-
$select->where('e.entity_id IN(?)', $productIds);
577+
$select->where('e.entity_id IN(?)', $productIds, \Zend_Db::INT_TYPE);
573578
}
574579

575580
$rowSet = $connection->fetchAll($select, $bind);
@@ -591,7 +596,8 @@ protected function _getProducts($productIds, $storeId, $entityId, &$lastEntityId
591596
['product_id', 'category_id']
592597
)->where(
593598
'product_id IN(?)',
594-
array_keys($products)
599+
array_keys($products),
600+
\Zend_Db::INT_TYPE
595601
);
596602
$categories = $connection->fetchAll($select);
597603
foreach ($categories as $category) {

app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@
6969
</actionGroup>
7070
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickDoneButton"/>
7171
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
72-
<!--Run re-index task -->
73-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
74-
<argument name="indices" value=""/>
75-
</actionGroup>
72+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
7673

7774
<!--Verify product is visible in category front page -->
7875
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@
7070
<argument name="targetPath" value="catalog/category/view/id/{$categoryId}"/>
7171
</actionGroup>
7272

73-
<!--Clear cache and reindex-->
74-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
75-
<argument name="indices" value=""/>
76-
</actionGroup>
73+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
7774
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
7875
<argument name="tags" value=""/>
7976
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createCustomStoreViewFr">
3131
<argument name="storeView" value="customStoreFR"/>
3232
</actionGroup>
33-
<!--Run full reindex and clear caches -->
34-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
35-
<argument name="indices" value=""/>
36-
</actionGroup>
33+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3734
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
3835
<argument name="tags" value=""/>
3936
</actionGroup>
@@ -47,9 +44,7 @@
4744
<after>
4845
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
4946
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
50-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
51-
<argument name="indices" value=""/>
52-
</actionGroup>
47+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="indexerReindex"/>
5348
<deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
5449
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
5550
<argument name="customStore" value="customStoreEN"/>
@@ -68,10 +63,7 @@
6863
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
6964
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{CatNotActive.name}}" stepKey="seeUpdatedCategoryTitle"/>
7065
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="verifyInactiveCategory"/>
71-
<!--Run full reindex and clear caches -->
72-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
73-
<argument name="indices" value=""/>
74-
</actionGroup>
66+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
7567
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
7668
<argument name="tags" value=""/>
7769
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createCustomStoreViewFr">
3131
<argument name="storeView" value="customStoreFR"/>
3232
</actionGroup>
33-
<!--Run full reindex and clear caches -->
34-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
35-
<argument name="indices" value=""/>
36-
</actionGroup>
33+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3734
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
3835
<argument name="tags" value=""/>
3936
</actionGroup>
@@ -47,9 +44,7 @@
4744
<after>
4845
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
4946
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
50-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
51-
<argument name="indices" value=""/>
52-
</actionGroup>
47+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="indexerReindex"/>
5348
<deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
5449
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
5550
<argument name="customStore" value="customStoreEN"/>
@@ -69,9 +64,8 @@
6964
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
7065
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleSubCategory.name}}" stepKey="seeUpdatedCategoryTitle"/>
7166
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="verifyInactiveIncludeInMenu"/>
72-
<!--Run full reindex and clear caches -->
7367
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
74-
<argument name="indices" value=""/>
68+
<argument name="indices" value="catalog_category_flat"/>
7569
</actionGroup>
7670
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
7771
<argument name="tags" value=""/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createCustomStoreViewFr">
3131
<argument name="storeView" value="customStoreFR"/>
3232
</actionGroup>
33-
<!--Run full reindex and clear caches -->
34-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
35-
<argument name="indices" value=""/>
36-
</actionGroup>
33+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3734
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
3835
<argument name="tags" value=""/>
3936
</actionGroup>
@@ -47,9 +44,7 @@
4744
<after>
4845
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
4946
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
50-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
51-
<argument name="indices" value=""/>
52-
</actionGroup>
47+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="indexerReindex"/>
5348
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
5449
<argument name="customStore" value="customStoreEN"/>
5550
</actionGroup>
@@ -70,9 +65,8 @@
7065
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
7166
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleSubCategory.name}}" stepKey="seeUpdatedCategoryTitle"/>
7267
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="verifyInactiveIncludeInMenu"/>
73-
<!--Run full reindex and clear caches -->
7468
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
75-
<argument name="indices" value=""/>
69+
<argument name="indices" value="catalog_category_flat"/>
7670
</actionGroup>
7771
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
7872
<argument name="tags" value=""/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@
9090
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/>
9191
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
9292

93-
<!--Run Re-Index task -->
94-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
95-
<argument name="indices" value=""/>
96-
</actionGroup>
93+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
9794

9895
<!--Verify product attribute added in product form -->
9996
<scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
<argument name="category" value="$$createPreReqCategory$$"/>
3232
<argument name="simpleProduct" value="ProductWithUnicode"/>
3333
</actionGroup>
34-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
35-
<argument name="indices" value=""/>
36-
</actionGroup>
34+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3735
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
3836
<argument name="tags" value=""/>
3937
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@
117117

118118
<!-- Verify we see success message -->
119119
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
120-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
121-
<argument name="indices" value=""/>
122-
</actionGroup>
120+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
123121
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
124122
<argument name="tags" value=""/>
125123
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@
9595
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
9696
<see selector="{{StorefrontCategoryMainSection.productLink}}" userInput="{{virtualProductBigQty.name}}" stepKey="seeVirtualProductNameOnCategoryPage"/>
9797

98-
<!--Run full reindex and clear caches -->
99-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
100-
<argument name="indices" value=""/>
101-
</actionGroup>
98+
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
10299
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
103100
<argument name="tags" value=""/>
104101
</actionGroup>

0 commit comments

Comments
 (0)