Skip to content

Commit

Permalink
phpcs & phpstan: emulate lowest supported PHP version (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Dec 27, 2023
1 parent 6103ed1 commit 1a542d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<exclude-pattern>tests/*/data/*</exclude-pattern>

<config name="installed_paths" value="../../slevomat/coding-standard"/>
<config name="php_version" value="70400"/>

<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
Expand Down Expand Up @@ -248,9 +249,7 @@
<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference">
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall"/> <!-- after bumping to PHP8 -->
</rule>
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
<properties>
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ includes:
- ./rules.neon

parameters:
phpVersion: 70400
paths:
- src
- tests
Expand Down Expand Up @@ -38,8 +39,6 @@ parameters:
ShipMonk\PHPStan\RuleTestCase: RuleTest
forbidAssignmentNotMatchingVarDoc:
enabled: false # native check is better now; this rule will be dropped / reworked in 3.0
enforceClosureParamNativeTypehint:
enabled: false # we support even PHP 7.4, some typehints cannot be used

ignoreErrors:
-
Expand Down

0 comments on commit 1a542d3

Please sign in to comment.