Skip to content

Commit e4275fc

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into ACP2E-3785
# Conflicts: # dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerGraphQl/Model/Resolver/CustomerTest.php
2 parents 70e984f + 27217d0 commit e4275fc

File tree

142 files changed

+5531
-1270
lines changed

Some content is hidden

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

142 files changed

+5531
-1270
lines changed

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

Lines changed: 402 additions & 0 deletions
Large diffs are not rendered by default.

app/code/Magento/Backend/App/Area/FrontNameResolver.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ public function getFrontName($checkHost = false)
117117
/**
118118
* Return whether the host from request is the backend host
119119
*
120+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
121+
* @SuppressWarnings(PHPMD.NPathComplexity)
122+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
120123
* @return bool
121124
*/
122125
public function isHostBackend()
@@ -128,10 +131,11 @@ public function isHostBackend()
128131
if ($this->scopeConfig->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE)) {
129132
$backendUrl = $this->scopeConfig->getValue(self::XML_PATH_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE);
130133
} else {
131-
$backendUrl = $this->config->getValue(Store::XML_PATH_UNSECURE_BASE_URL);
134+
$xmlPath = $this->request->isSecure() ? Store::XML_PATH_SECURE_BASE_URL : Store::XML_PATH_UNSECURE_BASE_URL;
135+
$backendUrl = $this->config->getValue($xmlPath);
132136
if ($backendUrl === null) {
133137
$backendUrl = $this->scopeConfig->getValue(
134-
Store::XML_PATH_UNSECURE_BASE_URL,
138+
$xmlPath,
135139
ScopeInterface::SCOPE_STORE
136140
);
137141
}

app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public function testIsHostBackend(
129129
->willReturnMap(
130130
[
131131
[Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE, null, $url],
132+
[Store::XML_PATH_SECURE_BASE_URL, ScopeInterface::SCOPE_STORE, null, $url],
132133
[
133134
FrontNameResolver::XML_PATH_USE_CUSTOM_ADMIN_URL,
134135
ScopeInterface::SCOPE_STORE,
@@ -160,7 +161,6 @@ public function testIsHostBackend(
160161
->setHost(parse_url($url, PHP_URL_HOST))
161162
->setPort(parse_url($url, PHP_URL_PORT))
162163
);
163-
164164
$this->assertEquals($expectedValue, $this->model->isHostBackend());
165165
}
166166

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundleProductActionSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright 2024 Adobe
4+
* Copyright 2025 Adobe
55
* All Rights Reserved.
66
*/
77
-->
@@ -14,6 +14,6 @@
1414
<element name="dropdownSelectOption" type="select" selector="//div[@class='control']/select"/>
1515
<element name="dropdownProductSelection" type="select" selector="//div[@class='control']/select/option[contains(.,'{{productName}}')]" parameterized="true"/>
1616
<element name="customOptionField" type="select" selector="[class='input-text product-custom-option']"/>
17-
<element name="bundleOption" type="text" selector="//*[@id='product-options-wrapper']//div[@class='control']//span[text()='{{productName}}']" parameterized="true"/>
17+
<element name="bundleOption" type="text" selector="//select[contains(@class, 'bundle-option')]/option[contains(text(),'{{productName}}')]" parameterized="true"/>
1818
</section>
1919
</sections>

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
);
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: {
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)