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 missing return type for some Generator methods #922

Closed
wants to merge 1 commit into from

Conversation

odolbeau
Copy link

@odolbeau odolbeau commented Dec 11, 2024

What is the reason for this PR?

Some methods does not have any return type.
PHPStan consider they return mixed and I have some "errors" in personal projects which use those methods.

Author's checklist

Summary of changes

Add missing return type for some Generator methods

Review checklist

  • All checks have passed
  • Changes are added to the CHANGELOG.md
  • Changes are approved by maintainer

@odolbeau odolbeau force-pushed the add-missing-return-types branch from 5a08242 to c56ed87 Compare December 11, 2024 13:47
@da-mask
Copy link

da-mask commented Dec 12, 2024

I'm not sure why , but this repo has a default branch of 2.0 (even though it seems abandoned) You might have better luck getting the pipeline to pass if you fork from the 1.x branch and create your PR against that.

@pimjansen
Copy link

This is also a BC which is not allowed besides a major release

@odolbeau odolbeau force-pushed the add-missing-return-types branch from c56ed87 to 9b34ebe Compare December 12, 2024 12:02
@odolbeau odolbeau changed the base branch from 2.0 to 1.24 December 12, 2024 12:02
@odolbeau
Copy link
Author

odolbeau commented Dec 12, 2024

@da-mask Thanks, branch changed! 👌
@pimjansen Theoretically speaking, you're right, it is a BC Break. In practice, this won't break anything as those methods already return strings only. If you don't want to merge this PR on 1.x, I can move back this PR to 2.0 and make another one to add @return annotations on 1.x. WDYT?

@pimjansen
Copy link

Its a BC since you change the signature of a public non final method. Therefor it is not allowed

@odolbeau odolbeau mentioned this pull request Dec 12, 2024
5 tasks
@odolbeau
Copy link
Author

@pimjansen I made #923 to add some annotations.
Tell me if you want me to rebase this PR against 2.0 as proposed in my previous comment.

@pimjansen
Copy link

@pimjansen I made #923 to add some annotations.

Tell me if you want me to rebase this PR against 2.0 as proposed in my previous comment.

I merged the other PR. 2.0 will be fully typed so no need to worry here

@odolbeau odolbeau closed this Dec 14, 2024
@odolbeau odolbeau deleted the add-missing-return-types branch December 14, 2024 12:57
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.

3 participants