Skip to content

Commit ccaec9e

Browse files
committed
Merge branch '2.4-develop' into AC-5979
2 parents e912b62 + 3920c2b commit ccaec9e

File tree

557 files changed

+130500
-3821
lines changed

Some content is hidden

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

557 files changed

+130500
-3821
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright 2025 Adobe
2+
# All Rights Reserved.
3+
14
automations:
25

36
############################################################################################################
@@ -401,3 +404,10 @@ automations:
401404
]
402405
actions:
403406
- addLabelsToRelated: ['${modifiedLabel.name}']
407+
408+
- trigger: issues.closed
409+
actions:
410+
- removeFromProject: [18]
411+
- removeFromProject: [21]
412+
- removeFromProject: [20]
413+
- removeFromProject: [19]

app/code/Magento/AsynchronousOperations/Controller/Adminhtml/Index/Index.php

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@
66

77
namespace Magento\AsynchronousOperations\Controller\Adminhtml\Index;
88

9-
class Index extends \Magento\Backend\App\Action
9+
use Magento\Backend\App\Action;
10+
use Magento\Backend\App\Action\Context;
11+
use Magento\Framework\App\Action\HttpGetActionInterface;
12+
use Magento\Framework\View\Result\Page;
13+
use Magento\Framework\View\Result\PageFactory;
14+
15+
class Index extends Action implements HttpGetActionInterface
1016
{
1117
/**
1218
* Authorization level of a basic admin session
1319
*
1420
* @see _isAllowed()
1521
*/
16-
const ADMIN_RESOURCE = 'Magento_Logging::system_magento_logging_bulk_operations';
22+
public const ADMIN_RESOURCE = 'Magento_Logging::system_magento_logging_bulk_operations';
1723

1824
/**
19-
* @var \Magento\Framework\View\Result\PageFactory
25+
* @var PageFactory
2026
*/
2127
private $resultPageFactory;
2228

@@ -26,33 +32,24 @@ class Index extends \Magento\Backend\App\Action
2632
private $menuId;
2733

2834
/**
29-
* Details constructor.
30-
* @param \Magento\Backend\App\Action\Context $context
31-
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
35+
* @param Context $context
36+
* @param PageFactory $resultPageFactory
3237
* @param string $menuId
3338
*/
3439
public function __construct(
35-
\Magento\Backend\App\Action\Context $context,
36-
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
40+
Context $context,
41+
PageFactory $resultPageFactory,
3742
$menuId = 'Magento_AsynchronousOperations::system_magento_logging_bulk_operations'
3843
) {
3944
$this->resultPageFactory = $resultPageFactory;
4045
$this->menuId = $menuId;
4146
parent::__construct($context);
4247
}
4348

44-
/**
45-
* @inheritDoc
46-
*/
47-
protected function _isAllowed()
48-
{
49-
return parent::_isAllowed();
50-
}
51-
5249
/**
5350
* Bulk list action
5451
*
55-
* @return \Magento\Framework\View\Result\Page
52+
* @return Page
5653
*/
5754
public function execute()
5855
{

app/code/Magento/AwsS3/Driver/AwsS3.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ private function createDirectoryRecursively(string $path): bool
188188
$parentDir = dirname($path);
189189

190190
while (!$this->isDirectory($parentDir)) {
191-
$this->createDirectoryRecursively($parentDir);
191+
if (!$this->createDirectoryRecursively($parentDir)) {
192+
return false;
193+
}
192194
}
193195

194196
if (!$this->isDirectory($path)) {

app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
/**
2020
* @see AwsS3
21+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2122
*/
2223
class AwsS3Test extends TestCase
2324
{
@@ -497,6 +498,23 @@ public function testCreateDirectory(): void
497498
self::assertTrue($this->driver->createDirectory(self::URL . 'test/test2/'));
498499
}
499500

501+
/**
502+
* This test ensures that the method does not loop infinitely in case of an exception
503+
*
504+
* @return void
505+
* @throws FileSystemException
506+
* @throws \PHPUnit\Framework\MockObject\Exception
507+
*/
508+
public function testShouldFailSafelyIfUnableToCreateDirectory(): void
509+
{
510+
$this->adapterMock->expects(self::once())
511+
->method('createDirectory')
512+
->willThrowException($this->createMock(\League\Flysystem\FilesystemException::class))
513+
->with('test');
514+
515+
self::assertFalse($this->driver->createDirectory(self::URL . 'test/test2/'));
516+
}
517+
500518
public function testRename(): void
501519
{
502520
$this->adapterMock->expects(self::once())

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,15 @@ public function getCurrentSelectionName()
457457
if ($this->getCurrentWebsiteName() !== '') {
458458
return $this->getCurrentWebsiteName();
459459
}
460+
461+
if (!$this->hasDefaultOption()) {
462+
$websites = $this->getWebsites();
463+
if (!empty($websites)) {
464+
$websiteArray = array_values($websites);
465+
return $websiteArray[0]->getName();
466+
}
467+
}
468+
460469
return $this->getDefaultSelectionName();
461470
}
462471

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCreateCustomConditionWithMultipleSelectInCartPriceRuleActionGroup" extends="AdminCreateCustomConditionInCartPriceRuleActionGroup">
11+
<annotations>
12+
<description>Create custom condition in action tab in cart price rule</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productAttributeOption" type="string" defaultValue="{{productAttributeColour.black}}"/>
16+
</arguments>
17+
<remove keyForRemoval="fillCategoryId"/>
18+
<selectOption selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{productAttributeOption}}" stepKey="selectProductAttributeValue"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="AdminDisableViewProductReportActionGroup">
12+
<annotations>
13+
<description>Admin disables most view products report in configuration</description>
14+
</annotations>
15+
<magentoCLI command="config:set {{AdminDisableReportConfigData.path}} {{AdminDisableReportConfigData.value}}" stepKey="setReportAsDisable"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="AdminEnableViewProductReportActionGroup">
12+
<annotations>
13+
<description>Admin enables most view products report in configuration</description>
14+
</annotations>
15+
<magentoCLI command="config:set {{AdminEnableReportConfigData.path}} {{AdminEnableReportConfigData.value}}" stepKey="setReportAsEnable"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Data/AdminMenuData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<data key="pageTitle">Dashboard</data>
2323
<data key="title">Dashboard</data>
2424
<data key="dataUiId">magento-backend-dashboard</data>
25+
<data key="message">Chart is disabled</data>
2526
</entity>
2627
<entity name="AdminMenuStores">
2728
<data key="pageTitle">Stores</data>

app/code/Magento/Backend/Test/Mftf/Data/AdminWebConfigData.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@
1616
<data key="path">web/seo/use_rewrites</data>
1717
<data key="value">0</data>
1818
</entity>
19+
<entity name="AdminEnableReportConfigData">
20+
<data key="path">reports/options/enabled</data>
21+
<data key="value">1</data>
22+
</entity>
23+
<entity name="AdminDisableReportConfigData">
24+
<data key="path">reports/options/enabled</data>
25+
<data key="value">0</data>
26+
</entity>
1927
</entities>

0 commit comments

Comments
 (0)