Skip to content

Calling QueryBuilder::update is updating the type of the vairable or $this. #219

Closed
@VincentLanglet

Description

@VincentLanglet
\PHPStan\dumpType($this);
$this->getEntityManager()->getRepository(WaitingList::class)->createQueryBuilder('w')->update();
\PHPStan\dumpType($this);

give me

263    Dumped type: $this(App\Core\Workflow\WorkflowProductStoreEventSubscriber)     
265    Dumped type: Doctrine\ORM\QueryBuilder

In the same way

$repo = $this->getEntityManager()->getRepository(WaitingList::class);
$repo->createQueryBuilder('w')->update();
\PHPStan\dumpType($repo);

is giving Dumped type: Doctrine\ORM\QueryBuilder instead of a repository.

If I manually remove the QueryBuilderTypeSpecifyingExtension, it fix my issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions