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

AMQPQueueException is unexpected in AMQPQueue::consume #5833

Closed
ossinkine opened this issue Oct 25, 2021 · 5 comments
Closed

AMQPQueueException is unexpected in AMQPQueue::consume #5833

ossinkine opened this issue Oct 25, 2021 · 5 comments

Comments

@ossinkine
Copy link

Bug report

\AMQPQueue::consume may throw an exception \AMQPQueueException but PHPStan does not expect this.
There is the similar issue #1011 where you @ondrejmirtes explained this is wrong reflection info provided by the extension.
But in this case I'm not sure that throwable exceptions are provided by reflection.
So please help where is the right place to fix this.

Code snippet that reproduces the problem

https://phpstan.org/r/a292c462-426e-46e1-9441-7f338320903f

@ondrejmirtes
Copy link
Member

That's old issue that precedes the usage of jetbrains/phpstorm-stubs in PHPStan. The best way forward is to add the exception here https://github.com/JetBrains/phpstorm-stubs/blob/89357e09f616af15b424b9ab035fad016de5aa5a/amqp/amqp.php#L1420-L1422 and ping me once it's merged so I can update the package here.

@ossinkine
Copy link
Author

Waiting for JetBrains/phpstorm-stubs#1263

@ossinkine
Copy link
Author

@ondrejmirtes this is merged in PHPStorm Stubs

@ondrejmirtes
Copy link
Member

Fixed by updating the stubs here :)

@github-actions
Copy link

github-actions bot commented Dec 8, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants