-
Notifications
You must be signed in to change notification settings - Fork 64
[cs] update coding standard to allow PHP 8 and Slevomat CS 6.4 #58
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{ | ||
"require": { | ||
"php": "^7.1 || ^8.0" | ||
}, | ||
"require-dev": { | ||
"consistence/coding-standard": "^3.5", | ||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", | ||
"slevomat/coding-standard": "^4.7.2" | ||
"consistence/coding-standard": "^3.10", | ||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", | ||
"slevomat/coding-standard": "^6.4.1" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="PHPStan PHPDoc Parser"> | ||
<config name="php_version" value="70100"/> | ||
<rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml"> | ||
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/> | ||
|
@@ -20,19 +21,15 @@ | |
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> | ||
<properties> | ||
<property name="usefulAnnotations" type="array" value=" | ||
@dataProvider, | ||
@requires | ||
"/> | ||
Comment on lines
-25
to
-28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure where this settings moved, as |
||
<property name="enableObjectTypeHint" value="false"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be replaced for all the rules by setting |
||
</properties> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/> | ||
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/> | ||
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/> | ||
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the only solution so far https://github.com/mhujer/yaml-sort-checker/pull/14/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485