Removed EchoSQLLogger

parent 8be6d163
# Upgrade to 3.0 # Upgrade to 3.0
## BC BREAK: Removed `EchoSQLLogger`
`EchoSQLLogger` is no longer available as part of the package.
## BC BREAK: Removed support for SQL Anywhere 12 and older ## BC BREAK: Removed support for SQL Anywhere 12 and older
DBAL now requires SQL Anywhere 16 or newer, support for unmaintained versions has been dropped. DBAL now requires SQL Anywhere 16 or newer, support for unmaintained versions has been dropped.
......
<?php
namespace Doctrine\DBAL\Logging;
use const PHP_EOL;
use function var_dump;
/**
* A SQL logger that logs to the standard output using echo/var_dump.
*/
class EchoSQLLogger implements SQLLogger
{
/**
* {@inheritdoc}
*/
public function startQuery($sql, ?array $params = null, ?array $types = null)
{
echo $sql . PHP_EOL;
if ($params) {
var_dump($params);
}
if (! $types) {
return;
}
var_dump($types);
}
/**
* {@inheritdoc}
*/
public function stopQuery()
{
}
}
...@@ -19,7 +19,6 @@ use Doctrine\DBAL\Events; ...@@ -19,7 +19,6 @@ use Doctrine\DBAL\Events;
use Doctrine\DBAL\Exception\InvalidArgumentException; use Doctrine\DBAL\Exception\InvalidArgumentException;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\Logging\DebugStack; use Doctrine\DBAL\Logging\DebugStack;
use Doctrine\DBAL\Logging\EchoSQLLogger;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\VersionAwarePlatformDriver; use Doctrine\DBAL\VersionAwarePlatformDriver;
...@@ -211,18 +210,6 @@ class ConnectionTest extends TestCase ...@@ -211,18 +210,6 @@ class ConnectionTest extends TestCase
]; ];
} }
/**
* Pretty dumb test, however we want to check that the EchoSQLLogger correctly implements the interface.
*
* @group DBAL-11
*/
public function testEchoSQLLogger() : void
{
$logger = new EchoSQLLogger();
$this->connection->getConfiguration()->setSQLLogger($logger);
self::assertSame($logger, $this->connection->getConfiguration()->getSQLLogger());
}
/** /**
* Pretty dumb test, however we want to check that the DebugStack correctly implements the interface. * Pretty dumb test, however we want to check that the DebugStack correctly implements the interface.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment