Skip to content

Commit e2a0e6a

Browse files
Merge branch '2.4-develop' into AC-8714_Varnish
2 parents 4c4ea36 + c893121 commit e2a0e6a

File tree

748 files changed

+15666
-3647
lines changed

Some content is hidden

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

748 files changed

+15666
-3647
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CloseAllDialogBoxes
2+
SelectAdminUsageSetting

app/code/Magento/AdvancedSearch/Model/DataProvider/AutocompleteSuggestions.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/AdvancedSearch/Test/Unit/Model/DataProvider/AutocompleteSuggestionsTest.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/Backend/Console/Command/MaintenanceStatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5353
{
5454
$output->writeln(
5555
'<info>Status: maintenance mode is ' .
56-
($this->maintenanceMode->isOn() ? 'active' : 'not active') . '</info>'
56+
($this->maintenanceMode->isOn() ? 'enabled' : 'disabled') . '</info>'
5757
);
5858
$addressInfo = $this->maintenanceMode->getAddressInfo();
5959
$addresses = implode(' ', $addressInfo);

app/code/Magento/Backend/Model/Validator/IpValidator.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<?php
2+
23
/**
34
* Copyright © Magento, Inc. All rights reserved.
45
* See COPYING.txt for license details.
56
*/
7+
68
namespace Magento\Backend\Model\Validator;
79

10+
use Magento\Framework\App\Utility\IPAddress;
11+
812
/**
913
* Class to validate list of IPs for maintenance commands
1014
*/
@@ -25,12 +29,22 @@ class IpValidator
2529
*/
2630
private $invalidIps;
2731

32+
/**
33+
* @param IPAddress $ipAddress
34+
*/
35+
public function __construct(
36+
private readonly IPAddress $ipAddress,
37+
) {
38+
}
39+
2840
/**
2941
* Validates list of ips
3042
*
3143
* @param string[] $ips
3244
* @param bool $noneAllowed
45+
*
3346
* @return string[]
47+
*
3448
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
3549
*/
3650
public function validateIps(array $ips, $noneAllowed)
@@ -55,22 +69,26 @@ public function validateIps(array $ips, $noneAllowed)
5569
$messages[] = "Invalid IP $invalidIp";
5670
}
5771
}
72+
5873
return $messages;
5974
}
6075

6176
/**
6277
* Filter ips into 'none', valid and invalid ips
6378
*
6479
* @param string[] $ips
80+
*
6581
* @return void
6682
*/
6783
private function filterIps(array $ips)
6884
{
6985
foreach ($ips as $ip) {
70-
if (filter_var($ip, FILTER_VALIDATE_IP)) {
71-
$this->validIps[] = $ip;
72-
} elseif ($ip == 'none') {
86+
if ($ip === 'none') {
7387
$this->none[] = $ip;
88+
} elseif ($this->ipAddress->isValidAddress($ip)) {
89+
$this->validIps[] = $ip;
90+
} elseif ($this->ipAddress->isValidRange($ip)) {
91+
$this->validIps[] = $ip;
7492
} else {
7593
$this->invalidIps[] = $ip;
7694
}

app/code/Magento/Backend/Test/Mftf/ActionGroup/SecondaryGridActionGroup.xml renamed to app/code/Magento/Backend/Test/Mftf/ActionGroup/DeleteEntitySecondaryGridActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</arguments>
2121

2222
<!-- search for the name -->
23+
<waitForElementClickable selector="{{AdminSecondaryGridSection.resetFilters}}" stepKey="waitForFiltersReset"/>
2324
<click stepKey="resetFilters" selector="{{AdminSecondaryGridSection.resetFilters}}"/>
2425
<fillField stepKey="fillIdentifier" selector="{{searchInput}}" userInput="{{name}}"/>
2526
<click stepKey="searchForName" selector="{{AdminSecondaryGridSection.searchButton}}"/>

app/code/Magento/Backend/Test/Unit/Console/Command/MaintenanceStatusCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ public function executeDataProvider()
5353
return [
5454
[
5555
[true, ['127.0.0.1', '127.0.0.2']],
56-
'Status: maintenance mode is active' . PHP_EOL .
56+
'Status: maintenance mode is enabled' . PHP_EOL .
5757
'List of exempt IP-addresses: 127.0.0.1 127.0.0.2' . PHP_EOL
5858
],
5959
[
6060
[true, []],
61-
'Status: maintenance mode is active' . PHP_EOL . 'List of exempt IP-addresses: none' . PHP_EOL
61+
'Status: maintenance mode is enabled' . PHP_EOL . 'List of exempt IP-addresses: none' . PHP_EOL
6262
],
6363
[
6464
[false, []],
65-
'Status: maintenance mode is not active' . PHP_EOL . 'List of exempt IP-addresses: none' . PHP_EOL
65+
'Status: maintenance mode is disabled' . PHP_EOL . 'List of exempt IP-addresses: none' . PHP_EOL
6666
],
6767
[
6868
[false, ['127.0.0.1', '127.0.0.2']],
69-
'Status: maintenance mode is not active' . PHP_EOL .
69+
'Status: maintenance mode is disabled' . PHP_EOL .
7070
'List of exempt IP-addresses: 127.0.0.1 127.0.0.2' . PHP_EOL
7171
],
7272
];

0 commit comments

Comments
 (0)