From 55c38269f13d34646a4b1af88ae6ed25f6a5adc8 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Sun, 29 Oct 2023 19:10:14 +0100 Subject: [PATCH] drop unused BacktraceLogger --- Dbal/Logging/BacktraceLogger.php | 28 ---------------------- DependencyInjection/DoctrineExtension.php | 4 ++-- Tests/Dbal/Logging/BacktraceLoggerTest.php | 23 ------------------ 3 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 Dbal/Logging/BacktraceLogger.php delete mode 100644 Tests/Dbal/Logging/BacktraceLoggerTest.php diff --git a/Dbal/Logging/BacktraceLogger.php b/Dbal/Logging/BacktraceLogger.php deleted file mode 100644 index 7411d066b..000000000 --- a/Dbal/Logging/BacktraceLogger.php +++ /dev/null @@ -1,28 +0,0 @@ -queries[$this->currentQuery]['backtrace'] = $backtrace; - } -} diff --git a/DependencyInjection/DoctrineExtension.php b/DependencyInjection/DoctrineExtension.php index f6f191183..ec6dc79f9 100644 --- a/DependencyInjection/DoctrineExtension.php +++ b/DependencyInjection/DoctrineExtension.php @@ -220,7 +220,7 @@ protected function dbalLoad(array $config, ContainerBuilder $container) } }); - $this->useMiddlewaresIfAvailable($container, $connWithLogging, $connWithProfiling, $connWithBacktrace); + $this->registerDbalMiddlewares($container, $connWithLogging, $connWithProfiling, $connWithBacktrace); } /** @@ -1168,7 +1168,7 @@ private function createArrayAdapterCachePool(ContainerBuilder $container, string * @param string[] $connWithProfiling * @param string[] $connWithBacktrace */ - private function useMiddlewaresIfAvailable( + private function registerDbalMiddlewares( ContainerBuilder $container, array $connWithLogging, array $connWithProfiling, diff --git a/Tests/Dbal/Logging/BacktraceLoggerTest.php b/Tests/Dbal/Logging/BacktraceLoggerTest.php deleted file mode 100644 index 6364ef837..000000000 --- a/Tests/Dbal/Logging/BacktraceLoggerTest.php +++ /dev/null @@ -1,23 +0,0 @@ -startQuery('SELECT column FROM table'); - $currentQuery = current($logger->queries); - self::assertSame('SELECT column FROM table', $currentQuery['sql']); - self::assertNull($currentQuery['params']); - self::assertNull($currentQuery['types']); - self::assertGreaterThan(0, $currentQuery['backtrace']); - } -}