Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Daniel1836's avatar

How do I dump the result of a large query? (Symfony)

I'm using Symfony query builder.

     $queryBuilder = $this->em->createQueryBuilder()
            ->select('s, h, v')
            ->from(Shipment::class, 's')
            ->join('s.hops', 'h')
            ->join('h.vessel', 'v')
            ->where('s.finalPortConfirmed = :confirmed')
            ->setParameter('confirmed', false)
            ->getQuery()
            ->getResult();

I need to see the resulting array so I can troubleshoot. If I var dump my test crashes because it is too large. I tried xdebug, but I'm still working on that. I viewed the sql query from my database on the Symfony profiler tab on my browser. But that does not show me how to access the values I need.

Does anyone have any ideas?

0 likes
1 reply

Please or to participate in this conversation.