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: Adding a new error hint, as suggested in #5078. #5648

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

troizet
Copy link
Collaborator

@troizet troizet commented Mar 10, 2023

Adding a new hint that checks if the return statement has a value if the return type is specified for the function, as suggested in #5078.

@mbien mbien added the PHP [ci] enable extra PHP tests (php/php.editor) label Mar 10, 2023
@mbien mbien added this to the NB18 milestone Mar 10, 2023
@mbien mbien added the hints label Mar 10, 2023
@troizet troizet force-pushed the return_statement_filled_value_hint branch 2 times, most recently from e3b557b to 035ad15 Compare March 11, 2023 04:13
@mbien mbien requested review from junichi11 and tmysik March 11, 2023 22:05
@junichi11
Copy link
Member

@troizet Please implement it in ReturnTypeHintError.

@troizet
Copy link
Collaborator Author

troizet commented Mar 12, 2023

That's what I did at first. Then I decided it would be easier to do it separately. OK, I'll try again. Thank you!

@troizet troizet force-pushed the return_statement_filled_value_hint branch from 035ad15 to 4b1c713 Compare March 13, 2023 15:29
@junichi11
Copy link
Member

Please fix the commit message and the title of this PR. Thanks!

Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

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

Thanks for your work!

@tmysik tmysik self-requested a review March 14, 2023 13:49
Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

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

Please, look at the comments and try to resolve them. Thank you.

…ue if the return type is specified for the function, as suggested in apache#5078

Fixing the cancelability bug in ReturnTypeHintError by reverting from a for each loop to a normal loop
@troizet troizet force-pushed the return_statement_filled_value_hint branch from 4b1c713 to f55ac21 Compare March 14, 2023 17:23
@troizet troizet changed the title PHP: Adding a new hint ReturnStatementWithoutValueHintError. PHP: Adding a new error hint, as suggested in #5078. Mar 14, 2023
Copy link
Member

@junichi11 junichi11 left a comment

Choose a reason for hiding this comment

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

Thanks for your work.

@tmysik
Copy link
Member

tmysik commented Mar 15, 2023

@junichi11 Not sure whether we need all the approvals; if not, feel free to merge anytime. Thank you.

@junichi11 junichi11 merged commit 232ad48 into apache:master Mar 15, 2023
@troizet
Copy link
Collaborator Author

troizet commented Mar 15, 2023

Thanks to all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hints PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants