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

[PHP 8.1] Add ReturnNeverTypeRector #6283

Merged
merged 5 commits into from May 2, 2021
Merged

[PHP 8.1] Add ReturnNeverTypeRector #6283

merged 5 commits into from May 2, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented May 2, 2021

Closes #6276

@TomasVotruba TomasVotruba force-pushed the php81-never branch 2 times, most recently from e543bf9 to f7fd312 Compare May 2, 2021 08:26
@TomasVotruba TomasVotruba changed the title add param types to configure() Add param types to configure() May 2, 2021
@TomasVotruba TomasVotruba changed the title Add param types to configure() [PHP 8.1] Add ReturnNeverTypeRector May 2, 2021
@TomasVotruba TomasVotruba force-pushed the php81-never branch 6 times, most recently from 908abe5 to 0c7d3ce Compare May 2, 2021 10:29

final class DieSome
{
public function run(): never
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this rector would use @return never instead of the native return type, it would ease usage with php 7.x (without the need for a additional downgrading step) - would you accept a PR changing this rector from :never to @return never ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think other rules also use @x alternative, unless the type is nativelly supported in PHP, so yes, go for it 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PHP 8.1] Add "never" type
2 participants