Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpcs & phpstan: emulate lowest supported PHP version #200

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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