camelot/doctrine-query-sql-formatter

Doctrine ORM Query SQL formatting, with parameters, to make runnable queries

v1.0.0 2019-10-29 12:28 UTC

This package is auto-updated.

Last update: 2024-11-29 05:03:57 UTC


README

Usage

<?php

use Camelot\DoctrineQueryFormatter\QuerySqlFormatter;
use Doctrine\ORM\Query;

/** @var Query $query */

$formatter = new QuerySqlFormatter();
$string = $formatter->replaceQueryParameters($query->getSQL(), $query->getParameters()->toArray());

echo $string;