-
Notifications
You must be signed in to change notification settings - Fork 56
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
Enable DisallowArrayTypeHintSyntax sniff #143
Conversation
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.
PHPStorm does not understand this, that's a no go
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.
Agree with @ostrolucky here: until current tooling understands the generic syntax, we shouldn't enforce this in doctrine/cs.
Makes sense. Thanks |
PHPStorm does understand that syntax: https://blog.jetbrains.com/phpstorm/2018/09/phpstorm-2018-3-eap-183-2635-12/ - that's just for reference not that we must enforce it now 😄 |
Only on parser level. You will not get |
Yea, don't know why they published the article, it's deceptive. PHPStorm does not complain about the syntax, but that's it 😄 |
This one is in their top 10 most voted issues for phpstorm but from information they gave me it's not even planned yet https://youtrack.jetbrains.com/issue/WI-43843 |
In my case, I started adding two sets of annotations (to be removed later on), such as /**
* @var Collection|Foo[] - notw that this type is invalid
* @psalm-var Collection<String, Foo>
*/ I'm hoping for the IDE to catch up, and then I'd do a find/replace |
type-hints
test to cover this (+2 errors, autoloading andstring[]
violation)If this passes, I can drop all
traversableTypeHints
settings from #139 (review)