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

Ensure generators aren't reused from failed state #12

Merged
merged 12 commits into from
Oct 23, 2023

Conversation

sanmai
Copy link
Owner

@sanmai sanmai commented Oct 23, 2023

No description provided.

@@ -41,7 +42,7 @@ final class Deferred implements Interfaces\Deferred
private $output;

/**
* @var \Throwable
* @var ?\Throwable
Copy link
Contributor

Choose a reason for hiding this comment

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

In docblock tags it is \Throwable|null

Copy link
Owner Author

Choose a reason for hiding this comment

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

Somehow Psalm understands ?Type in docblocks 🤔

Copy link
Contributor

@szepeviktor szepeviktor Oct 23, 2023

Choose a reason for hiding this comment

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

Yes it does but if you look a docblocks in other projects, question mark is not used for null.
https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html#return

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@szepeviktor szepeviktor Oct 23, 2023

Choose a reason for hiding this comment

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

You haven't written ?int below.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Well, I wasn't going to let it be a docblock forever 🙂

#16

@sanmai sanmai merged commit 87cd2b6 into main Oct 23, 2023
8 checks passed
@sanmai sanmai deleted the pr/closed-generator-exception branch October 23, 2023 13:31
@sanmai sanmai restored the pr/closed-generator-exception branch October 23, 2023 13:32
@sanmai sanmai deleted the pr/closed-generator-exception branch October 24, 2023 00:24
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.

None yet

2 participants