Level 39
May 30, 2022
1
Level 6
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?
Please or to participate in this conversation.