cmyker/doctrine-sql-logger

Doctrine SQL query debugger with binded parameters

dev-master / 0.1.x-dev 2018-01-26 10:02 UTC

This package is not auto-updated.

Last update: 2024-04-02 08:32:19 UTC


README

Debug Doctrine 2 real SQL queries with parameters

Installation

composer require cmyker/doctrine-sql-logger:dev-master

Usage example

$connection = $this->getEntityManager()->getConnection(); 
$logger = new \Cmyker\DoctrineSqlLogger\Logger($connection);
$connection->getConfiguration()->setSQLLogger($logger);
//some query here
$monologLogger->debug($logger->lastQuery); //or see the output

TODO more details