phpstan-doctrine
phpstan-doctrine copied to clipboard
Doctrine extensions for PHPStan
I'm currently in the process of upgrading phpstan an phpstan-doctrine to the current version (phpstan 1.11.6, phpstan-doctrine 1.4.4) and I'm encountering a new error. We have a test like the...
Hey! 😄 How can I use phpstan-doctrine inside if a project without an doctrine ORM? The project does have doctrine DBAL available but apparently the driver being used cannot be...
I believe it would be much better to work out of the box even with custom types. Generating custom descriptors is painful and ensuring descriptors exist is disabled by default...
I found this while preparing on my talk. I'll try to figure out best possible fix later.
Hi! Thank you for this project - it's awesome and we use it a lot! But I noticed, currently, phpstan-doctrine doesn't support analysing of always-read and written properties in ODM...
I have a strange issue that I cannot reproduce in CI: PHPStan execution does not end locally, it gets stuck at a certain code point (see example below) and runs...
It appears that `getSingleScalarResult()` currently always returns `bool|float|int|string|null`. If I have the following query: ```php $result = $this->createQueryBuilder('u') ->select('COUNT(u.id)') ->where('u.is_deleted = false') ->getQuery() ->getSingleScalarResult(); \PHPStan\assertType($result, 'bool|float|int|string|null'); ``` But when I...
Expected: PHPStand understands that such a definition is valid and that $id is set to `int` by Doctrine. Actual: > Property HelloWorld::$id (int|null) is never assigned int so it can...
I have no idea what this is, or what causes it. ```php // This all works: list dumpType($this->createQueryBuilder('e')->getQuery()->getResult()); dumpType($this->createQueryBuilder('my_name')->getQuery()->getResult()); dumpType($this->createQueryBuilder('oo')->getQuery()->getResult()); dumpType($this->createQueryBuilder('abcdef')->getQuery()->getResult()); dumpType($this->createQueryBuilder('user')->getQuery()->getResult()); dumpType($this->createQueryBuilder('av')->getQuery()->getResult()); dumpType($this->createQueryBuilder('eve')->getQuery()->getResult()); dumpType($this->createQueryBuilder('even')->getQuery()->getResult()); // This returns: mixed dumpType($this->createQueryBuilder('ev')->getQuery()->getResult());...
Testcase for https://github.com/phpstan/phpstan-doctrine/issues/608