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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump support for PHPStan to version 1.0 #381

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

rpkamp
Copy link
Contributor

@rpkamp rpkamp commented Nov 1, 2021

This pull request

  • Bump support for PHPStan to version 1.0

Fixes #379

These are the only deprecations I could find. vendor/bin/phpstan and vendor/bin/phpunit test/ passed locally.
I hope I didn't miss anything that other tooling would catch 🤞

@@ -120,7 +120,12 @@ private function isWhitelisted(Node $node): bool
return false;
}

if (\is_int(\preg_match_all('/@(\S+)(?=\s|$)/', $docComment->getReformattedText(), $matches))) {
$reformattedComment = $docComment->getReformattedText();
if (!\is_string($reformattedComment)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getReformattedText now returns string|mixed, so we need to make sure it's a string before we pass it to preg_match_all which strictly expects a string.

@rpkamp
Copy link
Contributor Author

rpkamp commented Nov 3, 2021

@localheinz since this is my first contribution to this repo, could you please approve the running of the workflows?

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #381 (d14e7c0) into main (d6dc28f) will decrease coverage by 0.16%.
The diff coverage is 90.00%.

❗ Current head d14e7c0 differs from pull request most recent head a13fee6. Consider uploading reports for the commit a13fee6 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main     #381      +/-   ##
============================================
- Coverage     90.20%   90.04%   -0.17%     
- Complexity      150      151       +1     
============================================
  Files            23       23              
  Lines           429      432       +3     
============================================
+ Hits            387      389       +2     
- Misses           42       43       +1     
Impacted Files Coverage Δ
src/Classes/FinalRule.php 91.89% <75.00%> (-2.23%) ⬇️
...asses/PHPUnit/Framework/TestCaseWithSuffixRule.php 82.14% <100.00%> (ø)
...ds/NoParameterWithContainerTypeDeclarationRule.php 94.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6dc28f...a13fee6. Read the comment docs.

@rpkamp
Copy link
Contributor Author

rpkamp commented Nov 3, 2021

I'm not sure what ComposerRequireChecker is complaining about. Those classes it claims don't exist actually do exist.

I did notice that PHPStan 1.0 is shipped as a PHAR file, maybe ComposerRequireChecker can't deal with that?

@rpkamp
Copy link
Contributor Author

rpkamp commented Nov 3, 2021

@localheinz all issues have been resolved or explained why they can't be resolved IMO 😁

@localheinz
Copy link
Member

@rpkamp

I'm not sure what ComposerRequireChecker is complaining about. Those classes it claims don't exist actually do exist.

I did notice that PHPStan 1.0 is shipped as a PHAR file, maybe ComposerRequireChecker can't deal with that?

I am sure that this is the problem, let's ignore these issues for now!

Copy link
Member

@localheinz localheinz left a comment

Choose a reason for hiding this comment

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

👍

@localheinz localheinz merged commit c96284a into ergebnis:main Nov 8, 2021
@localheinz
Copy link
Member

Thank you, @rpkamp!

Will cut a release shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prepare for PHPStan 1.0
2 participants