1
votes

I've read a lot of the Q&A already on here for this, as well as the Symfony docs, but I'm no further forward. I have an API that I want to see profiling data for Doctrine for. Using app_dev.php with Debug::enable();

config.yml doctrine: dbal: ...cut profiling: true

I can see the requests coming in to the profiler. The Doctrine 'tab' is greyed out and shows 0 across the board - queries, statements, query time, etc...

I have added a listener on kernel.response that adds doctrine queries to the response to prove there are things happening (nevermind that data is shown from the database in the response, ruling out caches).

I'm clearly missing something obvious. I just can't see what it is.

2

2 Answers

0
votes

I had overridden Doctrine's logger in my Bundle using ->setSQLLogger(new \Doctrine\DBAL\Logging\DebugStack);

Removing this corrects this error.

0
votes

In Symfony4+, you need to enable doctrine profiling:

# config/packages/dev/doctrine.yaml
doctrine:
  dbal:
    profiling: true