Skip to content

Commit 7aed289

Browse files
authored
Merge branch '2.4-develop' into bug/39479-grouped-product-qty-validation
2 parents ddcfdec + 3ad96f6 commit 7aed289

File tree

382 files changed

+10638
-3199
lines changed

Some content is hidden

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

382 files changed

+10638
-3199
lines changed

app/code/Magento/AdminAnalytics/Test/Mftf/Test/AdminCheckAnalyticsTrackingTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -16,6 +16,7 @@
1616
<severity value="MINOR"/>
1717
<testCaseId value="MC-36869"/>
1818
<group value="pr_exclude"/>
19+
<group value="all_bundled_only"/>
1920
</annotations>
2021
<before>
2122
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/AdvancedPricingImportExport/Controller/Adminhtml/Export/GetFilter.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
6+
67
namespace Magento\AdvancedPricingImportExport\Controller\Adminhtml\Export;
78

9+
use Magento\Backend\App\Action\Context;
810
use Magento\Framework\App\Action\HttpGetActionInterface;
911
use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
1012
use Magento\ImportExport\Controller\Adminhtml\Export as ExportController;
1113
use Magento\Framework\Controller\ResultFactory;
1214
use Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing as ExportAdvancedPricing;
1315
use Magento\Catalog\Model\Product as CatalogProduct;
16+
use Magento\ImportExport\Model\Export\EntityFiltersProviderInterface;
1417

1518
class GetFilter extends ExportController implements HttpGetActionInterface, HttpPostActionInterface
1619
{
20+
/**
21+
* @param Context $context
22+
* @param EntityFiltersProviderInterface $filtersProvider
23+
*/
24+
public function __construct(
25+
Context $context,
26+
private readonly EntityFiltersProviderInterface $filtersProvider
27+
) {
28+
parent::__construct($context);
29+
}
30+
1731
/**
1832
* Get grid-filter of entity attributes action.
1933
*
@@ -34,9 +48,7 @@ public function execute()
3448
/** @var $export \Magento\ImportExport\Model\Export */
3549
$export = $this->_objectManager->create(\Magento\ImportExport\Model\Export::class);
3650
$export->setData($data);
37-
$attrFilterBlock->prepareCollection(
38-
$export->filterAttributeCollection($export->getEntityAttributeCollection())
39-
);
51+
$attrFilterBlock->prepareCollection($this->filtersProvider->getFilters($export));
4052
return $resultLayout;
4153
} catch (\Exception $e) {
4254
$this->messageManager->addErrorMessage($e->getMessage());

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"require": {
88
"php": "~8.2.0||~8.3.0||~8.4.0",
99
"magento/framework": "*",
10+
"magento/module-backend": "*",
1011
"magento/module-catalog": "*",
1112
"magento/module-catalog-import-export": "*",
1213
"magento/module-catalog-inventory": "*",

app/code/Magento/AdvancedPricingImportExport/etc/di.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2015 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
@@ -19,4 +19,11 @@
1919
</arguments>
2020
</type>
2121
<preference for="Magento\ImportExport\Controller\Adminhtml\Export\GetFilter" type="Magento\AdvancedPricingImportExport\Controller\Adminhtml\Export\GetFilter" />
22+
<type name="Magento\ImportExport\Model\Export\EntityFiltersProvider">
23+
<arguments>
24+
<argument name="providers" xsi:type="array">
25+
<item name="advanced_pricing" xsi:type="object">Magento\CatalogImportExport\Model\Export\EntityFiltersProvider</item>
26+
</argument>
27+
</arguments>
28+
</type>
2229
</config>

app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
@@ -59,8 +59,10 @@
5959
<see selector="{{CatalogSection.successMessage}}" userInput="Configuration changes will be applied by consumer soon." stepKey="seeCustomSuccessMessage"/>
6060

6161
<!--Trigger the Consumer-->
62-
<magentoCLI stepKey="EnableAsyncConfig" command="queue:consumers:start saveConfigProcessor --max-messages=1"/>
63-
62+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="EnableAsyncConfig">
63+
<argument name="consumerName" value="saveConfigProcessor"/>
64+
<argument name="maxMessages" value="1"/>
65+
</actionGroup>
6466
<!--Open Configuration Page Again-->
6567
<amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPageAgain" />
6668
<waitForPageLoad stepKey="waitForPageLoadAgain"/>

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ public function getFrontName($checkHost = false)
107107
if ($checkHost && !$this->isHostBackend()) {
108108
return false;
109109
}
110-
$isCustomPathUsed = (bool)(string)$this->config->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_PATH);
111-
if ($isCustomPathUsed) {
112-
return (string)$this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_PATH);
113-
}
114-
return $this->defaultFrontName;
110+
111+
return $this->config->isSetFlag(self::XML_PATH_USE_CUSTOM_ADMIN_PATH)
112+
? (string)$this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_PATH)
113+
: $this->defaultFrontName;
115114
}
116115

117116
/**
@@ -127,9 +126,8 @@ public function isHostBackend()
127126
if (!$this->request->getServer('HTTP_HOST')) {
128127
return false;
129128
}
130-
131-
if ($this->scopeConfig->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE)) {
132-
$backendUrl = $this->scopeConfig->getValue(self::XML_PATH_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE);
129+
if ($this->scopeConfig->isSetFlag(self::XML_PATH_USE_CUSTOM_ADMIN_URL)) {
130+
$backendUrl = $this->scopeConfig->getValue(self::XML_PATH_CUSTOM_ADMIN_URL);
133131
} else {
134132
$xmlPath = $this->request->isSecure() ? Store::XML_PATH_SECURE_BASE_URL : Store::XML_PATH_UNSECURE_BASE_URL;
135133
$backendUrl = $this->config->getValue($xmlPath);
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/************************************************************************
4+
*
5+
* ADOBE CONFIDENTIAL
6+
* ___________________
7+
*
8+
* Copyright 2025 Adobe
9+
* All Rights Reserved.
10+
*
11+
* NOTICE: All information contained herein is, and remains
12+
* the property of Adobe and its suppliers, if any. The intellectual
13+
* and technical concepts contained herein are proprietary to Adobe
14+
* and its suppliers and are protected by all applicable intellectual
15+
* property laws, including trade secret and copyright laws.
16+
* Dissemination of this information or reproduction of this material
17+
* is strictly forbidden unless prior written permission is obtained
18+
* from Adobe.
19+
* ************************************************************************
20+
*/
721
-->
822

923
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1024
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1125
<entity name="backendDataOne" type="backend">
1226
<data key="backendConfigName">data</data>
1327
</entity>
28+
<entity name="WebdriverKey">
29+
<data key="tabKey">[\Facebook\WebDriver\WebDriverKeys::TAB]</data>
30+
</entity>
1431
</entities>

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

100644100755
Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,16 @@ protected function setUp(): void
8080
*/
8181
public function testIfCustomPathUsed(): void
8282
{
83-
$this->configMock
83+
$this->configMock->expects($this->once())
84+
->method('isSetFlag')
85+
->with(FrontNameResolver::XML_PATH_USE_CUSTOM_ADMIN_PATH)
86+
->willReturn(true);
87+
88+
$this->configMock->expects($this->once())
8489
->method('getValue')
85-
->willReturnCallback(fn($param) => match ([$param]) {
86-
['admin/url/use_custom_path'] => true,
87-
['admin/url/custom_path'] => 'expectedValue'
88-
});
90+
->with(FrontNameResolver::XML_PATH_CUSTOM_ADMIN_PATH)
91+
->willReturn('expectedValue');
92+
8993
$this->assertEquals('expectedValue', $this->model->getFrontName());
9094
}
9195

@@ -94,15 +98,11 @@ public function testIfCustomPathUsed(): void
9498
*/
9599
public function testIfCustomPathNotUsed(): void
96100
{
97-
$this->configMock->expects(
98-
$this->once()
99-
)->method(
100-
'getValue'
101-
)->with(
102-
'admin/url/use_custom_path'
103-
)->willReturn(
104-
false
105-
);
101+
$this->configMock->expects($this->once())
102+
->method('isSetFlag')
103+
->with(FrontNameResolver::XML_PATH_USE_CUSTOM_ADMIN_PATH)
104+
->willReturn(false);
105+
106106
$this->assertEquals($this->_defaultFrontName, $this->model->getFrontName());
107107
}
108108

@@ -125,7 +125,12 @@ public function testIsHostBackend(
125125
string $customAdminUrl,
126126
bool $expectedValue
127127
): void {
128-
$this->scopeConfigMock->method('getValue')
128+
$this->scopeConfigMock
129+
->method('isSetFlag')
130+
->willReturn($useCustomAdminUrl);
131+
132+
$this->scopeConfigMock
133+
->method('getValue')
129134
->willReturnMap(
130135
[
131136
[Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE, null, $url],
@@ -138,7 +143,7 @@ public function testIsHostBackend(
138143
],
139144
[
140145
FrontNameResolver::XML_PATH_CUSTOM_ADMIN_URL,
141-
ScopeInterface::SCOPE_STORE,
146+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
142147
null,
143148
$customAdminUrl
144149
]

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
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

88
namespace Magento\BundleImportExport\Test\Unit\Model\Import\Product\Type;
99

1010
use Magento\BundleImportExport\Model\Import\Product\Type\Bundle;
1111
use Magento\Catalog\Api\Data\ProductInterface;
12+
use Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection as ProductAttributeCollection;
13+
use Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory as ProductAttributeCollectionFactory;
1214
use Magento\CatalogImportExport\Model\Import\Product;
13-
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection;
14-
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory;
15+
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory as AttributeSetCollectionFactory;
1516
use Magento\Framework\App\ResourceConnection;
1617
use Magento\Framework\App\ScopeInterface;
1718
use Magento\Framework\App\ScopeResolverInterface;
@@ -34,46 +35,41 @@ class BundleTest extends AbstractImportTestCase
3435
/**
3536
* @var Bundle
3637
*/
37-
protected $bundle;
38+
private $bundle;
3839

3940
/**
4041
* @var ResourceConnection|MockObject
4142
*/
42-
protected $resource;
43+
private $resource;
4344

4445
/**
4546
* @var Select|MockObject
4647
*/
47-
protected $select;
48+
private $select;
4849

4950
/**
5051
* @var Product|MockObject
5152
*/
52-
protected $entityModel;
53+
private $entityModel;
5354

5455
/**
5556
* @var []
5657
*/
57-
protected $params;
58+
private $params;
5859

5960
/** @var AdapterInterface|MockObject
6061
*/
61-
protected $connection;
62+
private $connection;
6263

6364
/**
64-
* @var MockObject
65+
* @var AttributeSetCollectionFactory|MockObject
6566
*/
66-
protected $attrSetColFac;
67+
private $attrSetColFac;
6768

6869
/**
69-
* @var MockObject
70+
* @var ProductAttributeCollectionFactory|MockObject
7071
*/
71-
protected $prodAttrColFac;
72-
73-
/**
74-
* @var Collection|MockObject
75-
*/
76-
protected $setCollection;
72+
private $prodAttrColFac;
7773

7874
/**
7975
* @var ScopeResolverInterface|MockObject
@@ -179,36 +175,17 @@ protected function setUp(): void
179175
);
180176
$this->resource->expects($this->any())->method('getConnection')->willReturn($this->connection);
181177
$this->resource->expects($this->any())->method('getTableName')->willReturn('tableName');
182-
$this->attrSetColFac = $this->createPartialMock(
183-
CollectionFactory::class,
184-
['create']
185-
);
186-
$this->setCollection = $this->createPartialMock(
187-
Collection::class,
188-
['setEntityTypeFilter']
189-
);
190-
$this->attrSetColFac->expects($this->any())->method('create')->willReturn(
191-
$this->setCollection
192-
);
193-
$this->setCollection->expects($this->any())
194-
->method('setEntityTypeFilter')
195-
->willReturn([]);
196-
$this->prodAttrColFac = $this->createPartialMock(
197-
\Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory::class,
198-
['create']
199-
);
200-
$attrCollection =
201-
$this->createMock(\Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection::class);
202-
$attrCollection->expects($this->any())->method('addFieldToFilter')->willReturn([]);
178+
$this->attrSetColFac = $this->createMock(AttributeSetCollectionFactory::class);
179+
$this->prodAttrColFac = $this->createMock(ProductAttributeCollectionFactory::class);
180+
$attrCollection = $this->createMock(ProductAttributeCollection::class);
181+
$attrCollection->expects($this->any())->method('addFieldToFilter')->willReturnSelf();
182+
$attrCollection->expects($this->any())->method('getItems')->willReturn([]);
203183
$this->prodAttrColFac->expects($this->any())->method('create')->willReturn($attrCollection);
204184
$this->params = [
205185
0 => $this->entityModel,
206186
1 => 'bundle'
207187
];
208-
$this->scopeResolver = $this->getMockBuilder(ScopeResolverInterface::class)
209-
->disableOriginalConstructor()
210-
->onlyMethods(['getScope'])
211-
->getMockForAbstractClass();
188+
$this->scopeResolver = $this->createMock(ScopeResolverInterface::class);
212189

213190
$objects = [
214191
[

app/code/Magento/CacheInvalidate/Test/Mftf/Test/AdminValidateEAVTypesAndAttributesConfigurationTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
</annotations>
2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/>
24-
<!--Verify Cache Type EAV Types And Attributes Is ENABLED -->
25-
<waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusEnabled('EAV')}}" userInput="ENABLED" stepKey="verifyCacheTypeEAVTypesAndAttributesIsENABLED"/>
23+
<comment userInput="BIC Workaround" stepKey="goToCacheManagementPage" />
24+
<magentoCLI command="cache:enable" arguments="eav" stepKey="verifyCacheTypeEAVTypesAndAttributesIsENABLED"/>
2625
</before>
2726
<after>
2827
<!--Delete created entity -->

0 commit comments

Comments
 (0)