Skip to content

Commit b0d957a

Browse files
committed
Remove rules not compatible with new PHP 8.2 syntax
* "PSR1.Files.SideEffects.FoundWithSymbols" wrongly identifies read-only keyword as side effect * "Squiz.Classes.ClassDeclaration.SpaceBeforeKeyword" wrongly expects class keyword to be first in line
1 parent 2d66155 commit b0d957a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"nette/neon": "^3.3",
3535
"nikic/php-parser": "^4.15",
3636
"php-di/php-di": "^7.0.1",
37-
"phpcompatibility/php-compatibility": "^9.3",
3837
"slevomat/coding-standard": "^8.10.0",
3938
"squizlabs/php_codesniffer": "^3.7.2",
4039
"symfony/console": " ^6.2.8",

config/phpcs/ZooRoyal/ruleset.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
<arg name="report-checkstyle" value="../../../tmp/checkstyle"/>
99

1010
<!-- Referenced Rulesets -->
11-
<rule ref="PSR1" />
12-
<rule ref="PSR12" />
13-
14-
<config name="testVersion" value="7.4-"/>
15-
<rule ref="PHPCompatibility"/>
11+
<rule ref="PSR12" >
12+
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
13+
</rule>
1614

1715
<!-- Custom Rule-->
1816
<rule ref="../../../src/main/php/Sniffs/PHPCodeSniffer/Standards/ZooRoyal"/>
@@ -264,7 +262,9 @@
264262
-->
265263

266264
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
267-
<rule ref="Squiz.Classes.ClassDeclaration"/>
265+
<rule ref="Squiz.Classes.ClassDeclaration">
266+
<exclude name="Squiz.Classes.ClassDeclaration.SpaceBeforeKeyword" />
267+
</rule>
268268
<rule ref="Squiz.Classes.ClassFileName"/>
269269
<rule ref="Squiz.Classes.DuplicateProperty"/>
270270
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>

0 commit comments

Comments
 (0)