Skip to content

[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

Merged
merged 4 commits into from
Feb 8, 2021

Conversation

TomasVotruba
Copy link
Contributor

@TomasVotruba TomasVotruba commented Feb 7, 2021

@TomasVotruba TomasVotruba changed the title tv cs on php8 [cs] update coding standard to allow PHP 8 and Slevomat CS 6.4 Feb 7, 2021
@@ -60,6 +60,7 @@
<arg value="install"/>
<arg value="--working-dir"/>
<arg path="build-cs"/>
<arg value="--ignore-platform-reqs"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -25 to -28
<property name="usefulAnnotations" type="array" value="
@dataProvider,
@requires
"/>
Copy link
Contributor Author

@TomasVotruba TomasVotruba Feb 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this settings moved, as $usefulAnnotations is not there anymore, but coding standard is passing even without them.

@TomasVotruba
Copy link
Contributor Author

TomasVotruba commented Feb 7, 2021

Ready to merge ✔️

@dataProvider,
@requires
"/>
<property name="enableObjectTypeHint" value="false"/>
Copy link
Contributor Author

@TomasVotruba TomasVotruba Feb 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be replaced for all the rules by setting php_version to phpcs.xml config value:
https://github.com/slevomat/coding-standard/blob/614af5a6538aa7c96c45521522b329f770105cab/SlevomatCodingStandard/Sniffs/TypeHints/ParameterTypeHintSniff.php#L92

Done in this file above:
image

@ondrejmirtes ondrejmirtes merged commit a2f1a1f into phpstan:master Feb 8, 2021
@ondrejmirtes
Copy link
Member

Thank you!

@TomasVotruba TomasVotruba deleted the tv-cs-on-php8 branch February 8, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants