Skip to content

Commit 4a1154a

Browse files
committed
Merge branch '2.4-develop' into PR-Tier4-OM-2025-01-24
2 parents feb8a10 + 9e383b4 commit 4a1154a

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php

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

@@ -178,11 +178,10 @@ private function getRoutesWhitelist(): array
178178
private function caseClassesAndIdentifiers($currentModule, $file, &$contents)
179179
{
180180
$pattern = '~\b(?<class>(?<module>('
181-
. implode(
182-
'[_\\\\]|',
183-
Files::init()->getNamespaces()
184-
)
185-
. '(?<delimiter>[_\\\\]))[a-zA-Z0-9]{2,})'
181+
.'(?:'
182+
. implode('|', Files::init()->getNamespaces())
183+
. ')'
184+
. '(?<delimiter>[_\\\\]))[A-Z]{1,}[a-zA-Z0-9]{1,})'
186185
. '(?<class_inside_module>\\4[a-zA-Z0-9_\\\\]{2,})?)\b'
187186
. '(?:::(?<module_scoped_key>[A-Za-z0-9_/.]+)[\'"])?~';
188187

dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php

+3-3
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 2013 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Test\Integrity;
77

@@ -967,7 +967,7 @@ protected static function _prepareMapLayoutBlocks()
967967
$area = $matches['area'];
968968
self::$_mapLayoutBlocks[$area] = self::$_mapLayoutBlocks[$area] ?? [];
969969
}
970-
if (preg_match('/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)/', $file, $matches)) {
970+
if (preg_match('/(?<namespace>[A-Z][A-Za-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)/', $file, $matches)) {
971971
$module = $matches['namespace'] . '\\' . $matches['module'];
972972
$xml = simplexml_load_file($file);
973973
foreach ((array)$xml->xpath('//container | //block') as $element) {

0 commit comments

Comments
 (0)