Skip to content

Commit e51c908

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into simplify-install-instructions
2 parents a2cb670 + 5f4cb84 commit e51c908

File tree

4 files changed

+129
-3
lines changed

4 files changed

+129
-3
lines changed

Magento2/Sniffs/Less/ClassNamingSniff.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ public function process(File $phpcsFile, $stackPtr)
6666
[implode("", $matches[0])]
6767
);
6868
}
69-
if (strpos($className, self::STRING_HELPER_CLASSES_PREFIX, 2) !== false) {
69+
70+
if (strpos($className, self::STRING_HELPER_CLASSES_PREFIX, 2) !== false
71+
&& !str_starts_with($className, 'admin__')
72+
) {
7073
$phpcsFile->addError(
7174
'CSS class names should be separated with "-" (dash) instead of "_" (underscore)',
7275
$stackPtr,

Magento2/Tests/Less/ClassNamingUnitTest.less

+5
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@
3030
.category-title {
3131
background: green;
3232
}
33+
34+
// @see https://github.com/magento/magento-coding-standard/issues/409
35+
.admin__allowed {
36+
background: green;
37+
}

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"ext-dom": "*",
1616
"phpcompatibility/php-compatibility": "^9.3",
1717
"squizlabs/php_codesniffer": "^3.6.1",
18-
"rector/rector": "^0.15.10"
18+
"rector/rector": "^0.15.10",
19+
"symfony/polyfill": "^1.16"
1920
},
2021
"require-dev": {
2122
"phpunit/phpunit": "^9.5.8"

composer.lock

+118-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)