Symfony – Doctrine – How to see where an SQL query is executed
When using Doctrine, it is sometimes important to find where an SQL query is executed. Just turn on profiling_collect_backtrace on the connection, in the development configuration (config/packages/dev/doctrine.yaml): doctrine: dbal: connections: default: profiling_collect_backtrace: true Keep it for development only: collecting the call stack on every query is expensive. It relies on profiling, which is on by … Read more