Skip to content

Commit f8d4ba5

Browse files
committed
Merge branch '2.4-develop' into cia-2.4.9-alpha1-develop-2.4-develop-sync-04282025
2 parents c0d6865 + eb491c0 commit f8d4ba5

File tree

64 files changed

+2948
-482
lines changed

Some content is hidden

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

64 files changed

+2948
-482
lines changed

.github/app-projects-boards-automation.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ automations:
219219
- ['merged', 'eq', true]
220220
actions:
221221
- moveTo: [23, 'Recently Merged'] #['Pull Requests Dashboard', 'Recently Merged']
222+
- moveTo: [22, 'Recently Merged'] #['Community Dashboard', 'Recently Merged']
222223

223224
# 18. Whenever a pull request is closed:
224225
# a. it must be removed from the "Pull Requests Dashboard" project

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,9 @@ public function addMediaGalleryData()
23622362
return $this;
23632363
}
23642364

2365-
if (!$this->getSize()) {
2365+
$size = $this->isLoaded() ? $this->count() : $this->getSize();
2366+
2367+
if (!$size) {
23662368
return $this;
23672369
}
23682370

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -311,7 +311,6 @@ public function testAddMediaGalleryData()
311311
$this->metadataPoolMock->expects($this->once())->method('getMetadata')->willReturn($metadataMock);
312312
$metadataMock->expects($this->once())->method('getLinkField')->willReturn($linkField);
313313

314-
$this->connectionMock->expects($this->once())->method('fetchOne')->with($selectMock)->willReturn(42);
315314
$this->connectionMock->expects($this->once())->method('fetchAll')->with($selectMock)->willReturn(
316315
[['row_id' => $rowId]]
317316
);

app/code/Magento/Catalog/etc/db_schema.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
<index referenceId="CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID" indexType="btree">
136136
<column name="attribute_id"/>
137137
</index>
138+
<index referenceId="CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_ENTITY_ID" indexType="btree">
139+
<column name="attribute_id"/>
140+
<column name="entity_id"/>
141+
</index>
138142
<index referenceId="CATALOG_PRODUCT_ENTITY_INT_STORE_ID" indexType="btree">
139143
<column name="store_id"/>
140144
</index>

app/code/Magento/Catalog/etc/db_schema_whitelist.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
},
7070
"index": {
7171
"CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID": true,
72+
"CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_ENTITY_ID": true,
7273
"CATALOG_PRODUCT_ENTITY_INT_STORE_ID": true,
7374
"CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_STORE_ID_VALUE": true
7475
},
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright © Magento, Inc. All rights reserved.
3-
* See COPYING.txt for license details.
2+
* Copyright 2019 Adobe
3+
* All Rights Reserved.
44
*/
55

66
var config = {
@@ -10,7 +10,8 @@ var config = {
1010
priceOptionDate: 'Magento_Catalog/js/price-option-date',
1111
priceOptionFile: 'Magento_Catalog/js/price-option-file',
1212
priceOptions: 'Magento_Catalog/js/price-options',
13-
priceUtils: 'Magento_Catalog/js/price-utils'
13+
priceUtils: 'Magento_Catalog/js/price-utils',
14+
catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart'
1415
}
1516
}
1617
};

app/code/Magento/Catalog/view/frontend/web/js/validate-product.js renamed to app/code/Magento/Catalog/view/base/web/js/validate-product.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright © Magento, Inc. All rights reserved.
3-
* See COPYING.txt for license details.
2+
* Copyright 2016 Adobe
3+
* All Rights Reserved.
44
*/
55
define([
66
'jquery',

app/code/Magento/Catalog/view/frontend/requirejs-config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright © Magento, Inc. All rights reserved.
3-
* See COPYING.txt for license details.
2+
* Copyright 2011 Adobe
3+
* All Rights Reserved.
44
*/
55

66
var config = {
@@ -10,8 +10,7 @@ var config = {
1010
relatedProducts: 'Magento_Catalog/js/related-products',
1111
upsellProducts: 'Magento_Catalog/js/upsell-products',
1212
productListToolbarForm: 'Magento_Catalog/js/product/list/toolbar',
13-
catalogGallery: 'Magento_Catalog/js/gallery',
14-
catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart'
13+
catalogGallery: 'Magento_Catalog/js/gallery'
1514
}
1615
},
1716
config: {

app/code/Magento/CatalogInventoryGraphQl/Model/Resolver/QuantityResolver.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

88
namespace Magento\CatalogInventoryGraphQl\Model\Resolver;
99

1010
use Magento\Catalog\Api\ProductRepositoryInterface;
1111
use Magento\Catalog\Model\Product;
12-
use Magento\CatalogInventory\Model\StockState;
1312
use Magento\CatalogInventory\Model\Config\Source\NotAvailableMessage;
1413
use Magento\Framework\App\Config\ScopeConfigInterface;
1514
use Magento\Framework\Exception\LocalizedException;
@@ -36,16 +35,16 @@ class QuantityResolver implements ResolverInterface
3635
private const CONFIG_PATH_NOT_AVAILABLE_MESSAGE = "cataloginventory/options/not_available_message";
3736

3837
/**
38+
* QuantityResolver Constructor
39+
*
3940
* @param ProductRepositoryInterface $productRepositoryInterface
4041
* @param ScopeConfigInterface $scopeConfig
41-
* @param StockState $stockState
4242
* @param ProductStock $productStock
4343
*/
4444
public function __construct(
4545
private readonly ProductRepositoryInterface $productRepositoryInterface,
4646
private readonly ScopeConfigInterface $scopeConfig,
47-
private readonly StockState $stockState,
48-
private readonly ProductStock $productStock,
47+
private readonly ProductStock $productStock
4948
) {
5049
}
5150

@@ -69,7 +68,7 @@ public function resolve(
6968
}
7069

7170
if (isset($value['cart_item']) && $value['cart_item'] instanceof Item) {
72-
return $this->productStock->getProductAvailableStock($value['cart_item']);
71+
return $this->productStock->getSaleableQtyByCartItem($value['cart_item'], null);
7372
}
7473

7574
if (!isset($value['model'])) {
@@ -82,6 +81,7 @@ public function resolve(
8281
if ($product->getTypeId() === self::PRODUCT_TYPE_CONFIGURABLE) {
8382
$product = $this->productRepositoryInterface->get($product->getSku());
8483
}
85-
return $this->stockState->getStockQty($product->getId());
84+
85+
return $this->productStock->getSaleableQty($product, null);
8686
}
8787
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CatalogRule\Controller\Adminhtml\Promo\Catalog;
9+
10+
use Magento\Backend\App\AbstractAction;
11+
12+
abstract class MassAction extends AbstractAction
13+
{
14+
/**
15+
* Authorization level of a basic admin session
16+
*
17+
* @see _isAllowed()
18+
*/
19+
public const ADMIN_RESOURCE = 'Magento_CatalogRule::promo_catalog';
20+
}

0 commit comments

Comments
 (0)