-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add explicit @return
type next to #[ReturnTypeWillChange]
#8905
Conversation
1206cd7
to
fca1f52
Compare
@@ -82,6 +82,8 @@ protected function configure() | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* | |||
* @return int |
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.
Why is this needed for Symfony commands? This return type is not inherited from a native type like Countable
or ArrayIterator
, I thought this was only about native types. Isn't 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.
When used with DebugClassLoader
, this saves a deprecation: @return
means the same as #[ReturnTypeWillChange]
to 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.
Ok, I thought DebugClassLoader
wouldn't need it in the first place, since no stubs are involved, only normal PHP files. Apparently that's not the case.
Thanks @nicolas-grekas ! |
Same as doctrine/collections#280