-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Psalm in combination with v1.8.0 #53
Comments
@clue Can I please get your opinion on this? Thank you! |
Hey @gdejong, thanks for bringing this up 👍 I just looked into react/promise#202, this addresses a similar topic. I think the answer for this ticket would be the same as in there. This is also something that regards promise v2, this won't be a thing in the new v3. We're not sure when v3 will be released, but we're certain that this will come in the nearer future. What are your thoughts on this? |
For me to most important thing would be to get Psalm working/happy again at a strict level. I could understand if you won't fix this for v2 since you are working on v3. I am curious, are you testing v3 in projects that use Psalm to statically analyze the code? Because that would be great in my opinion :) |
Funny coincidence, @WyriHaximus opened up an discussion in psalm#7559 a week ago. To quote @WyriHaximus: "we want to make sure that promises are type safe in both Psalm's and PHPStan's eyes". That said, this shouldn't be a problem anymore when talking about promise v3 which is the development version at this moment (development but stable ^^). We don't have psalm integrated inside the ReactPHP projects itself, but we're using ReactPHP in some other projects in combination with psalm. If you want to try this out you can always install the current |
What @SimonFrings says 👍 @gdejong Thanks for reporting, I think we all agree that type safety is definitely super useful and something we're working on with reactphp/promise#188 and reactphp/promise#202, so I don't think there's much that can or needs to be done here. I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍 |
I'll upgrade that example with the |
Hi,
Since the recent
v1.8.0
release I am having some problems with Psalm.There is an example listed in the README of this project:
However when running Psalm with errorLevel 5 or lower I get:
I guess this is caused by the return type hint of
PromiseInterface
that was added to\React\Promise\Timer\timeout
.This
timeout()
function is returning anew Promise()
, would it be an idea to change the docblock to@return Promise
or@return ExtendedPromiseInterface
?The text was updated successfully, but these errors were encountered: