Skip to content

[2.15.0] Call to a member function removeQueryCacheProfile() on null #1654

@PhilETaylor

Description

@PhilETaylor

BC Break Report

Q A
BC Break yes
Version 2.15.0

Summary

Previously fully working live Symfony 6.3.x-dev/6.2 application working fine, until upgrade to doctrine/orm 2.15.0 this morning.

Previous behavior

The following code worked without issue in a standard Symfony repository

  public function getChangeLogSinceLastLogin($date): array
    {
        $query = $this->createQueryBuilder('o')
            ->orderBy('o.posted', Criteria::DESC)
            ->where('o.published = 1')
            ->andWhere('o.posted > :date and o.posted < :now')
            ->setParameter('date', $date)
            ->setParameter('now', date('Y-m-d H:i:s'))
            ->getQuery();

        return $query->getResult() ?? [];
    }

Current behavior

After updating to 2.15.0 the getResult method call fatal errors with

Call to a member function removeQueryCacheProfile() on null

ScreenShot-2023-05-04-12 11 51

How to reproduce

I can work on seeing if I can provide a reproducer after lunch, but posting here in case its a known issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions