Skip to content

Commit a59716d

Browse files
committed
Merge branch '2.4-develop' into Refactoring-AdminCreateCategoryTest
2 parents 82990ff + bb176b8 commit a59716d

File tree

328 files changed

+12970
-3272
lines changed

Some content is hidden

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

328 files changed

+12970
-3272
lines changed

.github/ISSUE_TEMPLATE/story.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: GraphQL Story
3+
about: User story for GraphQL project
4+
labels: 'Project: GraphQL'
5+
6+
---
7+
8+
*As a ___ I want to ___ so that ___.*
9+
10+
### AC
11+
* a
12+
* b
13+
### Approved Schema
14+
* a
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheCleanActionGroup">
12+
<annotations>
13+
<description>Run cache:clean by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheFlushActionGroup">
12+
<annotations>
13+
<description>Run cache:flush by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,7 @@ private function prepareBundlePriceByType($priceType, array $dimensions, $entity
377377
]
378378
);
379379

380-
$query = $select->insertFromSelect($this->getBundlePriceTable());
381-
$connection->query($query);
380+
$this->tableMaintainer->insertFromSelect($select, $this->getBundlePriceTable(), []);
382381
}
383382

384383
/**
@@ -418,8 +417,7 @@ private function calculateBundleOptionPrice($priceTable, $dimensions)
418417
]
419418
);
420419

421-
$query = $select->insertFromSelect($this->getBundleOptionTable());
422-
$connection->query($query);
420+
$this->tableMaintainer->insertFromSelect($select, $this->getBundleOptionTable(), []);
423421

424422
$this->getConnection()->delete($priceTable->getTableName());
425423
$this->applyBundlePrice($priceTable);
@@ -575,8 +573,7 @@ private function calculateFixedBundleSelectionPrice()
575573
'tier_price' => $tierExpr,
576574
]
577575
);
578-
$query = $select->insertFromSelect($this->getBundleSelectionTable());
579-
$connection->query($query);
576+
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);
580577

581578
$this->applyFixedBundleSelectionPrice();
582579
}
@@ -627,8 +624,7 @@ private function calculateDynamicBundleSelectionPrice($dimensions)
627624
'tier_price' => $tierExpr,
628625
]
629626
);
630-
$query = $select->insertFromSelect($this->getBundleSelectionTable());
631-
$connection->query($query);
627+
$this->tableMaintainer->insertFromSelect($select, $this->getBundleSelectionTable(), []);
632628
}
633629

634630
/**
@@ -697,8 +693,7 @@ private function prepareTierPriceIndex($dimensions, $entityIds)
697693
$select->where($this->dimensionToFieldMapper[$dimension->getName()] . ' = ?', $dimension->getValue());
698694
}
699695

700-
$query = $select->insertFromSelect($this->getTable('catalog_product_index_tier_price'));
701-
$connection->query($query);
696+
$this->tableMaintainer->insertFromSelect($select, $this->getTable('catalog_product_index_tier_price'), []);
702697
}
703698

704699
/**
@@ -725,8 +720,7 @@ private function applyBundlePrice($priceTable): void
725720
]
726721
);
727722

728-
$query = $select->insertFromSelect($priceTable->getTableName());
729-
$this->getConnection()->query($query);
723+
$this->tableMaintainer->insertFromSelect($select, $priceTable->getTableName(), []);
730724
}
731725

732726
/**
@@ -785,7 +779,7 @@ private function getMainTable($dimensions)
785779
if ($this->fullReindexAction) {
786780
return $this->tableMaintainer->getMainReplicaTable($dimensions);
787781
}
788-
return $this->tableMaintainer->getMainTable($dimensions);
782+
return $this->tableMaintainer->getMainTableByDimensions($dimensions);
789783
}
790784

791785
/**

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<requiredEntity createDataKey="createBundleOption"/>
3535
<requiredEntity createDataKey="createSimpleProduct"/>
3636
</createData>
37-
<magentoCron stepKey="runCronIndex" groups="index"/>
37+
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
3838
</before>
3939
<after>
4040
<!-- Delete Simple Product -->
@@ -56,9 +56,11 @@
5656
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
5757
<argument name="product" value="UpdateAttributeNameAndDescription"/>
5858
</actionGroup>
59-
<!--Run cron twice-->
60-
<magentoCLI command="cron:run" stepKey="cronRun"/>
61-
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
59+
<!-- Start message queue for product attribute consumer -->
60+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
61+
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
62+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
63+
</actionGroup>
6264
<!-- Search for a product with a new name and Open Product -->
6365
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
6466
<argument name="product" value="UpdateAttributeNameAndDescription"/>

app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getItems()
149149
$this->_compareProduct->setAllowUsedFlat(false);
150150

151151
$this->_items = $this->_itemCollectionFactory->create();
152-
$this->_items->useProductItem(true)->setStoreId($this->_storeManager->getStore()->getId());
152+
$this->_items->useProductItem()->setStoreId($this->_storeManager->getStore()->getId());
153153

154154
if ($this->httpContext->getValue(Context::CONTEXT_AUTH)) {
155155
$this->_items->setCustomerId($this->currentCustomer->getCustomerId());

app/code/Magento/Catalog/Helper/Product/Compare.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function getItemCollection()
279279
// cannot be placed in constructor because of the cyclic dependency which cannot be fixed with proxy class
280280
// collection uses this helper in constructor when calling isEnabledFlat() method
281281
$this->_itemCollection = $this->_itemCollectionFactory->create();
282-
$this->_itemCollection->useProductItem(true)->setStoreId($this->_storeManager->getStore()->getId());
282+
$this->_itemCollection->useProductItem()->setStoreId($this->_storeManager->getStore()->getId());
283283

284284
if ($this->_customerSession->isLoggedIn()) {
285285
$this->_itemCollection->setCustomerId($this->_customerSession->getCustomerId());
@@ -313,7 +313,7 @@ public function calculate($logout = false)
313313
{
314314
/** @var $collection Collection */
315315
$collection = $this->_itemCollectionFactory->create()
316-
->useProductItem(true);
316+
->useProductItem();
317317
if (!$logout && $this->_customerSession->isLoggedIn()) {
318318
$collection->setCustomerId($this->_customerSession->getCustomerId());
319319
} elseif ($this->_customerId) {

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function _syncData(array $processIds = [])
173173
}
174174
}
175175

176-
$query = $insertSelect->insertFromSelect($this->tableMaintainer->getMainTable($dimensions));
176+
$query = $insertSelect->insertFromSelect($this->tableMaintainer->getMainTableByDimensions($dimensions));
177177
$this->getConnection()->query($query);
178178
}
179179
return $this;
@@ -385,7 +385,7 @@ protected function _reindexRows($changedIds = [])
385385
// copy to index
386386
$this->_insertFromTable(
387387
$temporaryTable,
388-
$this->tableMaintainer->getMainTable($dimensions)
388+
$this->tableMaintainer->getMainTableByDimensions($dimensions)
389389
);
390390
}
391391
} else {
@@ -401,14 +401,16 @@ protected function _reindexRows($changedIds = [])
401401
}
402402

403403
/**
404+
* Delete Index data
405+
*
404406
* @param array $entityIds
405407
* @return void
406408
*/
407409
private function deleteIndexData(array $entityIds)
408410
{
409411
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
410412
$select = $this->getConnection()->select()->from(
411-
['index_price' => $this->tableMaintainer->getMainTable($dimensions)],
413+
['index_price' => $this->tableMaintainer->getMainTableByDimensions($dimensions)],
412414
null
413415
)->where('index_price.entity_id IN (?)', $entityIds);
414416
$query = $select->deleteFromSelect('index_price');
@@ -476,7 +478,7 @@ private function getIndexTargetTableByDimension(array $dimensions)
476478
{
477479
$indexTargetTable = $this->getIndexTargetTable();
478480
if ($indexTargetTable === self::getIndexTargetTable()) {
479-
$indexTargetTable = $this->tableMaintainer->getMainTable($dimensions);
481+
$indexTargetTable = $this->tableMaintainer->getMainTableByDimensions($dimensions);
480482
}
481483
if ($indexTargetTable === self::getIndexTargetTable() . '_replica') {
482484
$indexTargetTable = $this->tableMaintainer->getMainReplicaTable($dimensions);
@@ -497,6 +499,8 @@ protected function getIndexTargetTable()
497499
}
498500

499501
/**
502+
* Get product Id field name
503+
*
500504
* @return string
501505
*/
502506
protected function getProductIdFieldName()
@@ -533,6 +537,7 @@ private function getProductsTypes(array $changedIds = [])
533537

534538
/**
535539
* Get parent products types
540+
*
536541
* Used for add composite products to reindex if we have only simple products in changed ids set
537542
*
538543
* @param array $productsIds

0 commit comments

Comments
 (0)