Skip to content

Commit 6a03b44

Browse files
committed
Exclude ClassConstantTypeHint because we support older PHPs too
Need to bump the coding standard because otherwise phpcs complains that "Referenced sniff does not exist" even if excluded. I could still add docblock types for the constants, but let's not go there and wait until only PHP 8.3+ is supported (don't hold your breath). New spaze/coding-standard adds the rule https://github.com/spaze/coding-standard/releases/tag/v1.8.0
1 parent d146959 commit 6a03b44

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"php-parallel-lint/php-parallel-lint": "^1.2",
3232
"php-parallel-lint/php-console-highlighter": "^1.0",
3333
"phpstan/phpstan-deprecation-rules": "^1.2 || ^2.0",
34-
"spaze/coding-standard": "^1.7"
34+
"spaze/coding-standard": "^1.8"
3535
},
3636
"autoload": {
3737
"psr-4": {"Spaze\\PHPStan\\Rules\\Disallowed\\": "src"}

phpcs.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion" />
1010
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall" />
1111
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration" />
12+
<exclude name="SlevomatCodingStandard.TypeHints.ClassConstantTypeHint" />
1213
</rule>
1314
<exclude-pattern>tests/src/</exclude-pattern>
1415
</ruleset>

0 commit comments

Comments
 (0)