cmyker / doctrine-sql-logger

Debug Doctrine 2 real SQL queries with parameters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doctrine-sql-logger

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

About

Debug Doctrine 2 real SQL queries with parameters

License:GNU General Public License v2.0


Languages

Language:PHP 100.0%