Can Vural

Results 212 comments of Can Vural

You can already add your bootstrap file to the PHPStan's [config](https://phpstan.org/config-reference#bootstrap). Does that not work?

Yeah, that's what I meant. If Larastan can't bootstrap your app for some reason, you can write your own bootstrap file that boots up your app. And that file to...

Oh, what a coincidence then :sweat_smile: I'd love this to be in PHPStan. It'd solve a very large use case in Larastan/Laravel without writing bunch of extra extension code. Looks...

Thank you. Seems like a good idea to do it for `Log` facade and `\Illuminate\Log\LogManager` class 👍🏽

You can inject the `LogManager` class and call the method on it, like ```php public function foo(LogManager $logger, int $id): void { $logger->info('User id' . $id) } ``` Or `app('log')`...

Tests seem to pass in CI 🤯 But locally it fails

> This is exactly what I need to ruin my weekend thinking about this, thanks 😀 /jk of course 😊 heheh. It's a challenging one. One thing I just now...

> To be clear: You don't want this error to happen: > > > Anonymous function should return WeirdBug\Builder but returns WeirdBug\Builder. > > Because the return type of the...

Just realized I hit this bug again, while debugging an issue. Trying to understand what is going on, and what can be the potential solution also gave me a headache...

@ondrejmirtes I pushed a possible [fix](https://github.com/phpstan/phpstan-src/pull/3131/commits/ea5f4c219bb5f854b2680e129c9d1f8660943422) for this. My thinking was that we should compare the return type of the closure with the return type of the callable the closure...