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

The goal is to use the extension without having to provide a `objectManagerLoader`. The base functionality was added in https://github.com/phpstan/phpstan-doctrine/pull/253. Because `EntityColumnRule` uses `DescriptorRegistry` and that uses DBAL's `Type::getTypesMap` we...

I got a "please report this stack trace" error immediately following the extended configuration of this extension. After a bit of digging while writing up the issue, including recovering a...

Today at work I've realized there's currently no rules for ORM's embeddables so here's an attempt to change that :) I'll remove WIP once I'm done with my goals, for...

I'm not too sure about the `ShouldNotHappenException` as this can happen often, but that's a different topic :)

This is not a bugfix but rather just a bug-reproducer. I stumbled across this when testing a class that add extra conditions to a provided Query Builder. ``` Strict comparison...

`doctrine/orm` 2.12.0 now supports arrays of enums, see https://github.com/doctrine/orm/pull/9497 This is the syntax: ```php #[ORM\Column(type: Types::SIMPLE_ARRAY, length: 255, nullable: true, enumType: Foo::class)] private array $foo = []; ``` phpstan is...

Hi, I need to define both loaders (ODM and ORM) in same Symfony project, but configuration supports only one. Can you help me?

Since Version 1.3 I get the error `Anonymous function never returns Doctrine\ORM\QueryBuilder so it can be removed from the return type.` I use the anonymous functions within the buildForm method...

The following code ``` class Foo { private EntityManagerInterface $entityManager; public function __construct( ManagerRegistry $managerRegistry, ) { $this->entityManager = $managerRegistry->getManagerForClass(Bar::class); } ``` return the errors ``` Property Foo::$entityManager (Doctrine\ORM\EntityManagerInterface) does...

Shouldn't strings be allowed in the QueryBuilder::where parameters? ``` $qb->select(['u']) ->from(User::class, 'u') ->where( $qb->expr()->isNotNull('u.foo') ) ``` I think the example above is a valid usecase and the isNotNull method returns...