Skip to content

Commit

Permalink
Merge pull request #38 from mynameisbogdan/fix-params-echo-sql-logger
Browse files Browse the repository at this point in the history
Fix params for EchoSQLLogger
  • Loading branch information
shyim authored Oct 1, 2021
2 parents 2be760e + d48b4e5 commit 92409af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Doctrine/EchoSQLLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Doctrine\DBAL\Logging\SQLLogger;
use Shopware\Core\Profiling\Twig\DoctrineExtension;
use const PHP_EOL;

/**
* Print executed SQL to the console, in such a way that they can be easily copied to other SQL tools for further
Expand All @@ -16,10 +17,10 @@ public function startQuery($sql, ?array $params = null, ?array $types = null): v
$doctrineExtension = new DoctrineExtension();
echo $doctrineExtension->replaceQueryParameters(
$sql,
array_merge($params ?? [], $types ?? [])
$params ?? []
)
. ';'
. \PHP_EOL;
. PHP_EOL;
}

public function stopQuery(): void
Expand Down

0 comments on commit 92409af

Please sign in to comment.