-
in https://github.com/staabm/phpstan-todo-by we have some advanced use-cases in which we trigger http requests from within a rule. in https://github.com/staabm/phpstan-dba I have similar use-cases in which I have to trigger database queries from rules. I think there are plenty of other use-cases with similar requirements. did you think about whether rules could return a Alternatively we could think about a Fiber based approach |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Unfortunately I can't imagine how it could work.. A lot of PHPStan internals would have to be rewritten to be async. And because 100 % of PHPStan's work right now is CPU-bound, it's not worth it because there wouldn't be any advantages. Since you can ask about the data just once and then cache it, I don't think there would be much advantage in your case either. |
Beta Was this translation helpful? Give feedback.
For now I will implement a regular collector and do a curl-multi batch request in the rule. Thx for the input
staabm/phpstan-todo-by#77