Skip to content

Commit aa6558d

Browse files
committed
Merge remote-tracking branch 'act4/2.4-develop' into ACP2E-3505
2 parents cb75b81 + df2f7aa commit aa6558d

File tree

476 files changed

+8569
-3868
lines changed

Some content is hidden

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

476 files changed

+8569
-3868
lines changed

app/code/Magento/Analytics/ReportXml/BatchReportProviderInterface.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
<?php
2-
/************************************************************************
3-
*
2+
/**
43
* Copyright 2023 Adobe
54
* All Rights Reserved.
6-
*
7-
* NOTICE: All information contained herein is, and remains
8-
* the property of Adobe and its suppliers, if any. The intellectual
9-
* and technical concepts contained herein are proprietary to Adobe
10-
* and its suppliers and are protected by all applicable intellectual
11-
* property laws, including trade secret and copyright laws.
12-
* Dissemination of this information or reproduction of this material
13-
* is strictly forbidden unless prior written permission is obtained
14-
* from Adobe.
15-
* ************************************************************************
165
*/
176
declare(strict_types=1);
187

app/code/Magento/AwsS3/Test/Mftf/Helper/DummyMetadataCache.php

Lines changed: 12 additions & 12 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 2021 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -13,72 +13,72 @@
1313
class DummyMetadataCache implements \Magento\RemoteStorage\Driver\Adapter\Cache\CacheInterface
1414
{
1515
/**
16-
* @inheirtDoc
16+
* @inheritDoc
1717
*/
1818
public function exists(string $path): ?bool
1919
{
2020
return null;
2121
}
2222

2323
/**
24-
* @inheirtDoc
24+
* @inheritDoc
2525
*/
2626
public function getMetadata(string $path): ?array
2727
{
2828
return null;
2929
}
3030

3131
/**
32-
* @inheirtDoc
32+
* @inheritDoc
3333
*/
3434
public function flushCache(): void
3535
{
3636
}
3737

3838
/**
39-
* @inheirtDoc
39+
* @inheritDoc
4040
*/
4141
public function purgeQueue(): void
4242
{
4343
}
4444

4545
/**
46-
* @inheirtDoc
46+
* @inheritDoc
4747
*/
4848
public function moveFile(string $path, string $newpath): void
4949
{
5050
}
5151

5252
/**
53-
* @inheirtDoc
53+
* @inheritDoc
5454
*/
5555
public function copyFile(string $path, string $newpath): void
5656
{
5757
}
5858

5959
/**
60-
* @inheirtDoc
60+
* @inheritDoc
6161
*/
6262
public function deleteFile(string $path): void
6363
{
6464
}
6565

6666
/**
67-
* @inheirtDoc
67+
* @inheritDoc
6868
*/
6969
public function deleteDir(string $dirname): void
7070
{
7171
}
7272

7373
/**
74-
* @inheirtDoc
74+
* @inheritDoc
7575
*/
7676
public function updateMetadata(string $path, array $objectMetadata, bool $persist = false): void
7777
{
7878
}
7979

8080
/**
81-
* @inheirtDoc
81+
* @inheritDoc
8282
*/
8383
public function storeFileNotExists(string $path): void
8484
{

app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php

Lines changed: 49 additions & 4 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 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Backend\Controller\Adminhtml\System\Account;
77

@@ -11,9 +11,11 @@
1111
use Magento\Framework\Controller\ResultFactory;
1212
use Magento\Framework\Exception\State\UserLockedException;
1313
use Magento\Security\Model\SecurityCookie;
14+
use Magento\User\Model\User;
1415

1516
/**
1617
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18+
* @SuppressWarnings(PHPMD.AllPurposeAction)
1719
*/
1820
class Save extends \Magento\Backend\Controller\Adminhtml\System\Account
1921
{
@@ -25,8 +27,11 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Account
2527
/**
2628
* Get security cookie
2729
*
30+
* @deprecated 100.1.0 This method is deprecated because dependency injection should be used instead of
31+
* directly accessing the SecurityCookie instance.
32+
* Use dependency injection to get an instance of SecurityCookie.
33+
* @see \Magento\Backend\Controller\Adminhtml\System\Account::__construct()
2834
* @return SecurityCookie
29-
* @deprecated 100.1.0
3035
*/
3136
private function getSecurityCookie()
3237
{
@@ -81,7 +86,29 @@ public function execute()
8186
} else {
8287
$user->save();
8388
$user->sendNotificationEmailsIfRequired();
84-
$this->messageManager->addSuccessMessage(__('You saved the account.'));
89+
90+
$modifiedFields = $this->getModifiedFields($user);
91+
if (!empty($modifiedFields)) {
92+
$countModifiedFields = count($modifiedFields);
93+
// validate how many fields were modified to display them correctly
94+
if ($countModifiedFields > 1) {
95+
$lastModifiedField = array_pop($modifiedFields);
96+
$modifiedFieldsText = implode(', ', $modifiedFields);
97+
$successMessage = __(
98+
'The %1 and %2 of this account have been modified successfully.',
99+
$modifiedFieldsText,
100+
$lastModifiedField
101+
);
102+
} else {
103+
$successMessage = __(
104+
'The %1 of this account has been modified successfully.',
105+
reset($modifiedFields)
106+
);
107+
}
108+
$this->messageManager->addSuccessMessage($successMessage);
109+
} else {
110+
$this->messageManager->addSuccessMessage(__('You saved the account.'));
111+
}
85112
}
86113
} catch (UserLockedException $e) {
87114
$this->_auth->logout();
@@ -103,4 +130,22 @@ public function execute()
103130
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
104131
return $resultRedirect->setPath("*/*/");
105132
}
133+
134+
/**
135+
* Get user modified fields
136+
*
137+
* @param User $user
138+
* @return array
139+
*/
140+
private function getModifiedFields(User $user)
141+
{
142+
$modifiedFields = [];
143+
$propertiesToCheck = ['password', 'username', 'firstname', 'lastname', 'email'];
144+
foreach ($propertiesToCheck as $property) {
145+
if ($user->getOrigData($property) !== $user->{'get' . ucfirst($property)}()) {
146+
$modifiedFields[] = $property;
147+
}
148+
}
149+
return $modifiedFields;
150+
}
106151
}

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/System/Account/SaveTest.php

Lines changed: 4 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 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -215,7 +215,8 @@ public function testSaveAction(): void
215215
Form::IDENTITY_VERIFICATION_PASSWORD_FIELD => 'current_password'
216216
];
217217

218-
$testedMessage = 'You saved the account.';
218+
$testedMessage = "The password, username, firstname, lastname and email of this account"
219+
." have been modified successfully.";
219220

220221
$this->authSessionMock->expects($this->any())->method('getUser')->willReturn($this->userMock);
221222

app/code/Magento/Backend/view/adminhtml/ui_component/design_config_listing.xml

Lines changed: 7 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 2015 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
@@ -16,5 +16,10 @@
1616
<label translate="true">Theme Name</label>
1717
</settings>
1818
</column>
19+
<column name="short_description" sortOrder="45">
20+
<settings>
21+
<label translate="true">Short Description</label>
22+
</settings>
23+
</column>
1924
</columns>
2025
</listing>

app/code/Magento/Bundle/Model/Product/OriginalPrice.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
<?php
2-
/************************************************************************
3-
*
2+
/**
43
* Copyright 2024 Adobe
54
* All Rights Reserved.
6-
*
7-
* NOTICE: All information contained herein is, and remains
8-
* the property of Adobe and its suppliers, if any. The intellectual
9-
* and technical concepts contained herein are proprietary to Adobe
10-
* and its suppliers and are protected by all applicable intellectual
11-
* property laws, including trade secret and copyright laws.
12-
* Dissemination of this information or reproduction of this material
13-
* is strictly forbidden unless prior written permission is obtained
14-
* from Adobe.
15-
* ************************************************************************
165
*/
176
declare(strict_types=1);
187

app/code/Magento/Bundle/Plugin/Quote/UpdateBundleQuoteItemBaseOriginalPrice.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
<?php
2-
/************************************************************************
3-
*
2+
/**
43
* Copyright 2024 Adobe
54
* All Rights Reserved.
6-
*
7-
* NOTICE: All information contained herein is, and remains
8-
* the property of Adobe and its suppliers, if any. The intellectual
9-
* and technical concepts contained herein are proprietary to Adobe
10-
* and its suppliers and are protected by all applicable intellectual
11-
* property laws, including trade secret and copyright laws.
12-
* Dissemination of this information or reproduction of this material
13-
* is strictly forbidden unless prior written permission is obtained
14-
* from Adobe.
15-
* ************************************************************************
165
*/
176
declare(strict_types=1);
187

app/code/Magento/Bundle/Test/Mftf/ActionGroup/AdminFillCatalogProductsListWidgetSkuActionGroup.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/************************************************************************
4-
*
3+
/**
54
* Copyright 2023 Adobe
65
* All Rights Reserved.
7-
*
8-
* NOTICE: All information contained herein is, and remains
9-
* the property of Adobe and its suppliers, if any. The intellectual
10-
* and technical concepts contained herein are proprietary to Adobe
11-
* and its suppliers and are protected by all applicable intellectual
12-
* property laws, including trade secret and copyright laws.
13-
* Dissemination of this information or reproduction of this material
14-
* is strictly forbidden unless prior written permission is obtained
15-
* from Adobe.
16-
* ***********************************************************************
176
*/
187
-->
198

app/code/Magento/Bundle/Test/Mftf/Test/AdminAddDefaultImageBundleProductTest.xml

Lines changed: 2 additions & 4 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 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -18,8 +18,6 @@
1818
<testCaseId value="MC-115"/>
1919
<group value="Bundle"/>
2020
<group value="cloud"/>
21-
<!-- Excluded from PR builds due to AC-12124 -->
22-
<group value="pr_exclude"/>
2321
</annotations>
2422
<before>
2523
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleAddToCartFromWidget.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/************************************************************************
4-
*
3+
/**
54
* Copyright 2023 Adobe
65
* All Rights Reserved.
7-
*
8-
* NOTICE: All information contained herein is, and remains
9-
* the property of Adobe and its suppliers, if any. The intellectual
10-
* and technical concepts contained herein are proprietary to Adobe
11-
* and its suppliers and are protected by all applicable intellectual
12-
* property laws, including trade secret and copyright laws.
13-
* Dissemination of this information or reproduction of this material
14-
* is strictly forbidden unless prior written permission is obtained
15-
* from Adobe.
16-
* ***********************************************************************
176
*/
187
-->
198

0 commit comments

Comments
 (0)