-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support PHPStan 2.0 #144
base: main
Are you sure you want to change the base?
Support PHPStan 2.0 #144
Conversation
I thought I needed a |
9dce5c1
to
c823f54
Compare
/** | ||
* @param FileNode $node | ||
* @return string[] | ||
*/ | ||
public function processNode(Node $node, Scope $scope): array |
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.
The @param
should remain, so IDE can fill the methods on $node
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.
Ok, that doesn't make sense for an IDE that supports generics, but let's restore it.
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.
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.
This is why: #144 (review)
c823f54
to
e66aa45
Compare
e66aa45
to
7986458
Compare
I have to hurry up and catch a long-distance bus now, but I've finished what I can do. |
use Symplify\RuleDocGenerator\Contract\DocumentedRuleInterface; | ||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; | ||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; | ||
|
||
/** | ||
* @implements <FileNode> |
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.
The autocompletion does not work because this should say @implements Rule<FileNode>
.
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.
Thanks!
@@ -17,7 +17,7 @@ | |||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; | |||
|
|||
/** | |||
* @implements <FileNode> | |||
* @implements Node<FileNode> |
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.
Shouldn't this be Rule<FileNode>
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.
Yes. Running PHPStan on the code will report that.
All packages that are not compatible with PHPStan 2.0 have been temporarily removed.
refs rectorphp/rector#8815