diff --git a/UPGRADE.md b/UPGRADE.md index ea2c03324b9..a4412a6c83c 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -12,6 +12,7 @@ The Doctrine\DBAL\Version class is no longer available: please refrain from chec ## BC BREAK: the SQLLogger interface has changed The methods are the same but use scalar type hints, return types, and non-nullable arrays. +SQLLogger implementations are now final. Before: diff --git a/lib/Doctrine/DBAL/Logging/DebugStack.php b/lib/Doctrine/DBAL/Logging/DebugStack.php index 5d2c8cf62ab..bd1358f321d 100644 --- a/lib/Doctrine/DBAL/Logging/DebugStack.php +++ b/lib/Doctrine/DBAL/Logging/DebugStack.php @@ -7,7 +7,7 @@ /** * Includes executed SQLs in a Debug Stack. */ -class DebugStack implements SQLLogger +final class DebugStack implements SQLLogger { /** * Executed SQL queries. diff --git a/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php b/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php index 4a7da004cb7..cfca9dd7c90 100644 --- a/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php +++ b/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php @@ -8,7 +8,7 @@ /** * A SQL logger that logs to the standard output using echo/var_dump. */ -class EchoSQLLogger implements SQLLogger +final class EchoSQLLogger implements SQLLogger { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Logging/LoggerChain.php b/lib/Doctrine/DBAL/Logging/LoggerChain.php index 2eaac3e02e4..598f51e2a6b 100644 --- a/lib/Doctrine/DBAL/Logging/LoggerChain.php +++ b/lib/Doctrine/DBAL/Logging/LoggerChain.php @@ -5,7 +5,7 @@ /** * Chains multiple SQLLogger. */ -class LoggerChain implements SQLLogger +final class LoggerChain implements SQLLogger { /** @var SQLLogger[] */ private $loggers = [];