Skip to content

Commit bd29788

Browse files
committed
Merge branch '2.4-develop' of github.com:magento-commerce/magento2ce into eav-graphql
2 parents fe4f448 + a047c76 commit bd29788

File tree

216 files changed

+4193
-4263
lines changed

Some content is hidden

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

216 files changed

+4193
-4263
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\System\Store\Grid\Render;
77

8+
use Magento\Framework\DataObject;
9+
810
/**
911
* Store render group
1012
*
@@ -13,9 +15,9 @@
1315
class Group extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1416
{
1517
/**
16-
* {@inheritdoc}
18+
* @inheritDoc
1719
*/
18-
public function render(\Magento\Framework\DataObject $row)
20+
public function render(DataObject $row)
1921
{
2022
if (!$row->getData($this->getColumn()->getIndex())) {
2123
return null;
@@ -28,6 +30,6 @@ public function render(\Magento\Framework\DataObject $row)
2830
'">' .
2931
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
3032
'</a><br />'
31-
. '(' . __('Code') . ': ' . $row->getGroupCode() . ')';
33+
. '(' . __('Code') . ': ' . $this->escapeHtml($row->getGroupCode()) . ')';
3234
}
3335
}

app/code/Magento/Backend/Block/Widget/Grid/Extended.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,11 @@ public function getCsv()
10671067
$data = [];
10681068
foreach ($this->getColumns() as $column) {
10691069
if (!$column->getIsSystem()) {
1070+
$exportField = (string)$column->getRowFieldExport($item);
10701071
$data[] = '"' . str_replace(
10711072
['"', '\\'],
10721073
['""', '\\\\'],
1073-
$column->getRowFieldExport($item) ?: ''
1074+
$exportField ?: ''
10741075
) . '"';
10751076
}
10761077
}

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@
349349
<field id="transport">smtp</field>
350350
</depends>
351351
</field>
352-
<field id="password" translate="label comment" type="password" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
352+
<field id="password" translate="label comment" type="obscure" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
353353
<label>Password</label>
354-
<comment>Username</comment>
354+
<comment>Password</comment>
355+
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
355356
<depends>
356357
<field id="transport">smtp</field>
357358
</depends>

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class Bundle extends AbstractView
3636
protected $options;
3737

3838
/**
39-
* Catalog product
40-
*
4139
* @var \Magento\Catalog\Helper\Product
4240
*/
4341
protected $catalogProduct;
@@ -405,7 +403,7 @@ private function getConfigData(Product $product, array $options)
405403
*/
406404
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
407405
{
408-
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
406+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/{$optionId}") ?? [];
409407
$selections = $options[$optionId]['selections'];
410408
array_walk(
411409
$selections,

app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function testMoveWhenCannotFindParentCategory(): void
214214
{
215215
$this->expectException('Magento\Framework\Exception\LocalizedException');
216216
$this->expectExceptionMessage('Sorry, but we can\'t find the new parent category you selected.');
217-
$this->markTestIncomplete('MAGETWO-31165');
217+
$this->markTestSkipped('MAGETWO-31165');
218218
$parentCategory = $this->createPartialMock(
219219
Category::class,
220220
['getId', 'setStoreId', 'load']
@@ -260,7 +260,7 @@ public function testMoveWhenParentCategoryIsSameAsChildCategory(): void
260260
$this->expectExceptionMessage(
261261
'We can\'t move the category because the parent category name matches the child category name.'
262262
);
263-
$this->markTestIncomplete('MAGETWO-31165');
263+
$this->markTestSkipped('MAGETWO-31165');
264264
$parentCategory = $this->createPartialMock(
265265
Category::class,
266266
['getId', 'setStoreId', 'load']

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/ImportTest.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Category/Plugin/ImportTest.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ private function buildSearchCriteria(array $args, ResolveInfo $info): SearchCrit
186186
{
187187
$productFields = (array)$info->getFieldSelection(1);
188188
$includeAggregations = isset($productFields['filters']) || isset($productFields['aggregations']);
189-
$processedArgs = $this->argsSelection->process((string) $info->fieldName, $args);
189+
$fieldName = $info->fieldName ?? "";
190+
$processedArgs = $this->argsSelection->process((string) $fieldName, $args);
190191
$searchCriteria = $this->searchCriteriaBuilder->build($processedArgs, $includeAggregations);
191192

192193
return $searchCriteria;

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
use Magento\Catalog\Api\ProductRepositoryInterface;
1010
use Magento\Catalog\Model\Config as CatalogConfig;
11+
use Magento\Catalog\Model\Indexer\Product\Category as ProductCategoryIndexer;
12+
use Magento\Catalog\Model\Indexer\Product\Price\Processor as ProductPriceIndexer;
1113
use Magento\Catalog\Model\Product\Visibility;
1214
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
1315
use Magento\CatalogImportExport\Model\Import\Product\LinkProcessor;
@@ -1102,6 +1104,7 @@ protected function _deleteProducts()
11021104
'catalog_product_import_bunch_delete_after',
11031105
['adapter' => $this, 'bunch' => $bunch]
11041106
);
1107+
$this->reindexProducts($idsToDelete);
11051108
}
11061109
}
11071110
return $this;
@@ -1660,7 +1663,7 @@ protected function _saveProducts()
16601663
$prevAttributeSet,
16611664
$attributes
16621665
);
1663-
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
1666+
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
16641667
} catch (Skip $skip) {
16651668
// Product is skipped. Go on to the next one.
16661669
}
@@ -2466,9 +2469,17 @@ private function reindexStockStatus(array $productIds): void
24662469
*/
24672470
private function reindexProducts($productIdsToReindex = [])
24682471
{
2469-
$indexer = $this->indexerRegistry->get('catalog_product_category');
2470-
if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) {
2471-
$indexer->reindexList($productIdsToReindex);
2472+
if (is_array($productIdsToReindex) && !empty($productIdsToReindex)) {
2473+
$indexersToReindex = [
2474+
ProductCategoryIndexer::INDEXER_ID,
2475+
ProductPriceIndexer::INDEXER_ID
2476+
];
2477+
foreach ($indexersToReindex as $id) {
2478+
$indexer = $this->indexerRegistry->get($id);
2479+
if (!$indexer->isScheduled()) {
2480+
$indexer->reindexList($productIdsToReindex);
2481+
}
2482+
}
24722483
}
24732484
}
24742485

app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)