Skip to content

Commit 2829610

Browse files
authored
Merge branch '2.4-develop' into no-author/review
2 parents cfae994 + 0b41085 commit 2829610

File tree

3,271 files changed

+120501
-85523
lines changed

Some content is hidden

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

3,271 files changed

+120501
-85523
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For more detailed information on contribution please read our [beginners guide](
1515

1616
## Contribution requirements
1717

18-
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html).
18+
1. Contributions must adhere to the [Magento coding standards](https://developer.adobe.com/commerce/php/coding-standards/).
1919
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
2020
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/HEAD/.github/PULL_REQUEST_TEMPLATE.md) for more information.
2121
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad
2626

2727
## Contribute
2828

29-
Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://devdocs.magento.com/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas.
29+
Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://developer.adobe.com/commerce/docs/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas.
3030

3131
- [Contribute to the code](https://developer.adobe.com/commerce/contributor/guides/code-contributions/)
3232
- [Report an issue](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#report)
@@ -36,7 +36,7 @@ Our [Community](https://opensource.magento.com/) is large and diverse, and our p
3636

3737
### Maintainers
3838

39-
We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production.
39+
We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production.
4040

4141
- [Learn more about the Maintainer role](https://developer.adobe.com/commerce/contributor/guides/maintainers/)
4242
- [Maintainer's Handbook](https://developer.adobe.com/commerce/contributor/guides/maintainers/handbook/)
@@ -64,9 +64,9 @@ Stay up-to-date on the latest security news and patches by signing up for [Secur
6464
## Licensing
6565

6666
Each Magento source file included in this distribution is licensed under OSL 3.0 or the terms and conditions of the applicable ordering document between Licensee/Customer and Adobe (or Magento).
67-
67+
6868
[Open Software License (OSL 3.0)](https://opensource.org/licenses/osl-3.0.php) – Please see [LICENSE.txt](LICENSE.txt) for the full text of the OSL 3.0 license.
69-
69+
7070
Subject to Licensee's/Customer's payment of fees and compliance with the terms and conditions of the applicable ordering document between Licensee/Customer and Adobe (or Magento), the terms and conditions of the applicable ordering between Licensee/Customer and Adobe (or Magento) supersede the OSL 3.0 license for each source file.
7171

7272
## Communications

app/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80100) {
1818
if (PHP_SAPI == 'cli') {
1919
echo 'Magento supports PHP 8.1.0 or later. ' .
20-
'Please read https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html';
20+
'Please read https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html';
2121
} else {
2222
echo <<<HTML
2323
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
2424
<p>Magento supports PHP 8.1.0 or later. Please read
25-
<a target="_blank" href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html">
25+
<a target="_blank" href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html">
2626
Magento System Requirements</a>.
2727
</div>
2828
HTML;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.
1+
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.

app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<group value="menu"/>
2020
<group value="mtf_migrated"/>
2121
<group value="pr_exclude"/>
22+
<group value="cloud"/>
2223
</annotations>
2324
<before>
2425
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationToolbarBlockAclTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MC-36011"/>
1919
<group value="menu"/>
20+
<group value="cloud"/>
2021
</annotations>
2122
<before>
2223
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/AdvancedSearch/Test/Mftf/Test/AdminAddSearchTermTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<severity value="CRITICAL"/>
1818
<group value="AdvancedSearch"/>
1919
<group value="pr_exclude"/>
20+
<group value="cloud"/>
2021
</annotations>
2122
<before>
2223
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<group value="analytics"/>
1919
<group value="mtf_migrated"/>
2020
<group value="pr_exclude"/>
21+
<group value="cloud"/>
2122
</annotations>
2223

2324
<before>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<group value="menu"/>
2020
<group value="mtf_migrated"/>
2121
<group value="pr_exclude"/>
22+
<group value="cloud"/>
2223
</annotations>
2324
<before>
2425
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<testCaseId value="MAGETWO-63981"/>
1818
<group value="analytics"/>
1919
<group value="pr_exclude"/>
20+
<group value="cloud"/>
2021
</annotations>
2122
<before>
2223
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<testCaseId value="MAGETWO-63898"/>
1919
<group value="analytics"/>
2020
<group value="pr_exclude"/>
21+
<group value="cloud"/>
2122
</annotations>
2223
<before>
2324
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<click selector="{{AdminUserGridSection.searchResultFirstRow}}" stepKey="clickFoundUsername"/>
3636
<waitForPageLoad time="30" stepKey="wait2"/>
3737
<seeInField selector="{{AdminEditUserSection.usernameTextField}}" userInput="$$noReportUser.username$$" stepKey="seeUsernameInField"/>
38-
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillCurrentPassword"/>
38+
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_CREDS.magento/MAGENTO_ADMIN_PASSWORD}}" stepKey="fillCurrentPassword"/>
3939
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
4040

4141
<click selector="{{AdminEditUserSection.userRoleTab}}" stepKey="clickUserRoleTab"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<testCaseId value="MAGETWO-66464"/>
1919
<group value="analytics"/>
2020
<group value="pr_exclude"/>
21+
<group value="cloud"/>
2122
</annotations>
2223
<before>
2324
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
11+
<suite name="AsyncOperationsSuite">
12+
<include>
13+
<group name="async_operations"/>
14+
</include>
15+
</suite>
16+
</suites>

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@
1616
<severity value="MAJOR"/>
1717
<testCaseId value="ACPT-885"/>
1818
<group value="configuration"/>
19+
<group value="async_operations" />
1920
</annotations>
2021
<before>
2122
<!--Enable Async Configuration-->
2223
<magentoCLI stepKey="EnableAsyncConfig" command="setup:config:set --no-interaction --config-async 1"/>
23-
<magentoCLI stepKey="ClearConfigCache" command="cache:flush"/>
24+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="ClearConfigCache">
25+
<argument name="tags" value=""/>
26+
</actionGroup>
2427
<!--Login to Admin-->
2528
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
2629
</before>
2730
<after>
2831
<magentoCLI stepKey="DisableAsyncConfig" command="setup:config:set --no-interaction --config-async 0"/>
2932
<magentoCLI stepKey="setBackDefaultConfigValue" command="config:set catalog/frontend/grid_per_page 12" />
30-
<magentoCLI stepKey="ClearConfigCache" command="cache:clean"/>
33+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="ClearConfigCache">
34+
<argument name="tags" value="config"/>
35+
</actionGroup>
3136
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
3237
</after>
3338

app/code/Magento/AsynchronousOperations/Model/AccessValidator.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
namespace Magento\AsynchronousOperations\Model;
88

9-
/**
10-
* Class AccessValidator
11-
*/
9+
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
10+
use Magento\Authorization\Model\UserContextInterface;
11+
1212
class AccessValidator
1313
{
1414
/**
15-
* @var \Magento\Authorization\Model\UserContextInterface
15+
* @var UserContextInterface
1616
*/
1717
private $userContext;
1818

@@ -27,13 +27,12 @@ class AccessValidator
2727
private $bulkSummaryFactory;
2828

2929
/**
30-
* AccessValidator constructor.
31-
* @param \Magento\Authorization\Model\UserContextInterface $userContext
30+
* @param UserContextInterface $userContext
3231
* @param \Magento\Framework\EntityManager\EntityManager $entityManager
3332
* @param \Magento\AsynchronousOperations\Api\Data\BulkSummaryInterfaceFactory $bulkSummaryFactory
3433
*/
3534
public function __construct(
36-
\Magento\Authorization\Model\UserContextInterface $userContext,
35+
UserContextInterface $userContext,
3736
\Magento\Framework\EntityManager\EntityManager $entityManager,
3837
\Magento\AsynchronousOperations\Api\Data\BulkSummaryInterfaceFactory $bulkSummaryFactory
3938
) {
@@ -50,11 +49,15 @@ public function __construct(
5049
*/
5150
public function isAllowed($bulkUuid)
5251
{
53-
/** @var \Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface $bulkSummary */
52+
/** @var BulkSummaryInterface $bulkSummary */
5453
$bulkSummary = $this->entityManager->load(
5554
$this->bulkSummaryFactory->create(),
5655
$bulkUuid
5756
);
57+
if ((int) $bulkSummary->getUserType() === UserContextInterface::USER_TYPE_INTEGRATION) {
58+
return true;
59+
}
60+
5861
return ((int) $bulkSummary->getUserId()) === ((int) $this->userContext->getUserId());
5962
}
6063
}

app/code/Magento/AsynchronousOperations/Model/BulkStatus/Options.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,29 @@
77

88
use Magento\AsynchronousOperations\Api\Data\BulkSummaryInterface;
99

10-
/**
11-
* Class Options
12-
*/
1310
class Options implements \Magento\Framework\Data\OptionSourceInterface
1411
{
1512
/**
16-
* @return array
13+
* @inheritDoc
1714
*/
1815
public function toOptionArray()
1916
{
2017
return [
2118
[
2219
'value' => BulkSummaryInterface::NOT_STARTED,
23-
'label' => 'Not Started'
20+
'label' => __('Not Started')
2421
],
2522
[
2623
'value' => BulkSummaryInterface::IN_PROGRESS,
27-
'label' => 'In Progress'
24+
'label' => __('In Progress')
2825
],
2926
[
3027
'value' => BulkSummaryInterface::FINISHED_SUCCESSFULLY,
31-
'label' => 'Finished Successfully'
28+
'label' => __('Finished Successfully')
3229
],
3330
[
3431
'value' => BulkSummaryInterface::FINISHED_WITH_FAILURE,
35-
'label' => 'Finished with Failure'
32+
'label' => __('Finished with Failure')
3633
]
3734
];
3835
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\AsynchronousOperations\Model\BulkUserType;
9+
10+
use Magento\Authorization\Model\UserContextInterface;
11+
use Magento\Framework\Data\OptionSourceInterface;
12+
13+
class Options implements OptionSourceInterface
14+
{
15+
/**
16+
* @inheritDoc
17+
*/
18+
public function toOptionArray(): array
19+
{
20+
return [
21+
[
22+
'value' => UserContextInterface::USER_TYPE_ADMIN,
23+
'label' => __('Admin user')
24+
],
25+
[
26+
'value' => UserContextInterface::USER_TYPE_INTEGRATION,
27+
'label' => __('Integration')
28+
]
29+
];
30+
}
31+
}

app/code/Magento/AsynchronousOperations/Model/ResourceModel/System/Message/Collection/Synchronized/Plugin.php

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111
class Plugin
1212
{
13+
private const MESSAGES_LIMIT = 5;
1314
/**
1415
* @var \Magento\AdminNotification\Model\System\MessageFactory
1516
*/
@@ -95,27 +96,32 @@ public function afterToArray(
9596
$this->bulkNotificationManagement->getAcknowledgedBulksByUser($userId)
9697
);
9798
$bulkMessages = [];
99+
$messagesCount = 0;
100+
$data = [];
98101
foreach ($userBulks as $bulk) {
99102
$bulkUuid = $bulk->getBulkId();
100103
if (!in_array($bulkUuid, $acknowledgedBulks)) {
101-
$details = $this->operationDetails->getDetails($bulkUuid);
102-
$text = $this->getText($details);
103-
$bulkStatus = $this->statusMapper->operationStatusToBulkSummaryStatus($bulk->getStatus());
104-
if ($bulkStatus === \Magento\Framework\Bulk\BulkSummaryInterface::IN_PROGRESS) {
105-
$text = __('%1 item(s) are currently being updated.', $details['operations_total']) . $text;
104+
if ($messagesCount < self::MESSAGES_LIMIT) {
105+
$details = $this->operationDetails->getDetails($bulkUuid);
106+
$text = $this->getText($details);
107+
$bulkStatus = $this->statusMapper->operationStatusToBulkSummaryStatus($bulk->getStatus());
108+
if ($bulkStatus === \Magento\Framework\Bulk\BulkSummaryInterface::IN_PROGRESS) {
109+
$text = __('%1 item(s) are currently being updated.', $details['operations_total']) . $text;
110+
}
111+
$data = [
112+
'data' => [
113+
'text' => __('Task "%1": ', $bulk->getDescription()) . $text,
114+
'severity' => \Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR,
115+
// md5() here is not for cryptographic use.
116+
// phpcs:ignore Magento2.Security.InsecureFunction
117+
'identity' => md5('bulk' . $bulkUuid),
118+
'uuid' => $bulkUuid,
119+
'status' => $bulkStatus,
120+
'created_at' => $bulk->getStartTime()
121+
]
122+
];
123+
$messagesCount++;
106124
}
107-
$data = [
108-
'data' => [
109-
'text' => __('Task "%1": ', $bulk->getDescription()) . $text,
110-
'severity' => \Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR,
111-
// md5() here is not for cryptographic use.
112-
// phpcs:ignore Magento2.Security.InsecureFunction
113-
'identity' => md5('bulk' . $bulkUuid),
114-
'uuid' => $bulkUuid,
115-
'status' => $bulkStatus,
116-
'created_at' => $bulk->getStartTime()
117-
]
118-
];
119125
$bulkMessages[] = $this->messageFactory->create($data)->toArray();
120126
}
121127
}

0 commit comments

Comments
 (0)