-
Notifications
You must be signed in to change notification settings - Fork 545
Implement template default types #1835
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
Conversation
b798793 to
1a41c5a
Compare
Feel free to rebase your PR without any Composer changes, I updated the parser on 1.9.x :)
1a41c5a to
269ed62
Compare
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.
I wonder what syntax is for bound templates? Something like @template T of bool = true?
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
a5d90c1 to
a69c7f0
Compare
@rvanvelzen Are you still interested in solving this? Having default values would be extremely handy!
@ruudk I won't have time to work on this in the foreseeable future, but I do intend to solve this.
That being said, anyone should feel free to take this over :)
@rvanvelzen I need to tell you that I really miss your contributions :) Not just this specific one, but in general - a PR from you was always something to look forward to :)
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.
@template T of Xxx test should be added like in phpstan/phpstan#4801 (comment).
When of Xxx is specified, it should be used as implicit default type.
Since #1835 is resolved ; I assume this PR can be closed @rvanvelzen
Fixes phpstan/phpstan#4801