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

Add explicit @return type next to #[ReturnTypeWillChange] #8905

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas force-pushed the ret-types branch 3 times, most recently from 1206cd7 to fca1f52 Compare August 10, 2021 16:58
@@ -82,6 +82,8 @@ protected function configure()

/**
* {@inheritdoc}
*
* @return int
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

@greg0ire greg0ire merged commit 3b9e04e into doctrine:2.9.x Aug 10, 2021
@greg0ire
Copy link
Member

Thanks @nicolas-grekas !

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.

3 participants