phpstan-src
phpstan-src copied to clipboard
PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository.
Hello! This adds failings tests for https://github.com/phpstan/phpstan/issues/12585. Please note that there's actually two bugs here: ### 1. Return type I'm getting errors of the form: ```php Post::query()->whereHas('user', fn ($q) =>...
Fixes: phpstan/phpstan#12462. As is, when checking if a function (or method) is a generator (via `PhpFunctionFromParserNodeReflection::isGenerator()`) all subnodes are recursively checked for containment of a yield expression. Hence any function...
Closes phpstan/phpstan#12317
closes https://github.com/phpstan/phpstan/issues/3323 as described [in comment](https://github.com/phpstan/phpstan/issues/3323#issuecomment-637799286)
Fixes https://github.com/phpstan/phpstan/issues/12246 Ref https://phpstan.org/r/178ac73a-e99c-4961-957f-a3c6062d7c44 Ref https://3v4l.org/5s30L
refs https://github.com/phpstan/phpstan/issues/12725
closes https://github.com/phpstan/phpstan/issues/12629 observations: - baseline generation crashed PHPStan before this fix ``` Fatal error: Uncaught Nette\Neon\Exception: Invalid UTF-8 sequence: #^Regex pattern is invalid\: Compilation failed\: UTF\-8 error\: byte 2 top...
Issue: https://github.com/phpstan/phpstan/issues/12326