phpstan-doctrine icon indicating copy to clipboard operation
phpstan-doctrine copied to clipboard

Doctrine extensions for PHPStan

Results 110 phpstan-doctrine issues
Sort by recently updated
recently updated
newest added

PHPStan 1.10.59, phpstan-doctrine 1.3.62, phpstan-phpunit 1.3.16, bleeding edge + strict rules I have a piece of code in my tests that roughly looks like this: ```php self::assertNull($userRepository->findOneBy(['email' => '[email protected]'])); //...

This was not working due to imperfect PHPStorm detection. Now you can easily run single dataset case. ![image](https://github.com/phpstan/phpstan-doctrine/assets/1993453/8194798c-b01f-4a7f-b1a9-d4f2dab1cd3e)

On any released version of Sylius-Standard, I couldn't get phpstan-doctrine to work. Full error : ``` Call to an undefined method Sylius\Component\Core\Repository\OrderRepositoryInterface::findOneByThing(). ``` Here's a minimal reproducer : ```php

Very closely related: https://github.com/phpstan/phpstan-doctrine/issues/229 If you have an entity class to handle PDO based Symfony sessions (`Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler`) the `$sessId` property will cause PHPStan to think that property `$sessId` is never...

I want to mark a Doctrine entity $id field that is autogenerated by database engine as `@var positive-int`. However PHPStan complains. ```php class Entity { /** * @var positive-int|null */...

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Eomm/why-don-t-you-tweet](https://redirect.github.com/Eomm/why-don-t-you-tweet) | action | major | `v1` -> `v2` | --- ### Release...

When using the query builder, if the queried entity has alias `"attribute"`, the type of the query result is considered `mixed` instead of `list`. For example, with the following code:...

### Bug report Internal error: Internal error: get_class(): Argument phpstan/phpstan#1 ($object) must be of type object, array given while analysing file /app/src/Infrastructure/Doctrine/MT3/Repository/TrainableConfigurationRepository.php Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml: ##...