From 102ee3a5aad4766db3ca88ee21c0b9c32d1a107a Mon Sep 17 00:00:00 2001 From: Sergei Tigrov Date: Tue, 21 Nov 2023 20:52:22 +0700 Subject: [PATCH] Deprecate unnecessary argument `$rawSql` of `AbstractCommand::internalExecute()` (#778) --- CHANGELOG.md | 4 ++-- src/Command/AbstractCommand.php | 4 ++-- src/Driver/Pdo/AbstractPdoCommand.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44d5f549f..52c6a39a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ ## 1.2.1 under development -- Bug #777: Fix `Query::count()` when it returns an incorrect value if the result is greater - than `PHP_INT_MAX` (@Tigrov) +- Bug #777: Fix `Query::count()` when it returns an incorrect value if the result is greater than `PHP_INT_MAX` (@Tigrov) +- Enh #778: Deprecate unnecessary argument `$rawSql` of `AbstractCommand::internalExecute()` (@Tigrov) ## 1.2.0 November 12, 2023 diff --git a/src/Command/AbstractCommand.php b/src/Command/AbstractCommand.php index 479c1052e..0561e3bd1 100644 --- a/src/Command/AbstractCommand.php +++ b/src/Command/AbstractCommand.php @@ -548,7 +548,7 @@ abstract protected function internalGetQueryResult(int $queryMode): mixed; /** * Executes a prepared statement. * - * @param string|null $rawSql The rawSql if it has been created. + * @param string|null $rawSql Deprecated. Use `null` value. Will be removed in version 2.0.0. * * @throws Exception * @throws Throwable @@ -581,7 +581,7 @@ protected function queryInternal(int $queryMode): mixed $isReadMode = $this->isReadMode($queryMode); $this->prepare($isReadMode); - $this->internalExecute($this->getRawSql()); + $this->internalExecute(null); /** @psalm-var mixed $result */ $result = $this->internalGetQueryResult($queryMode); diff --git a/src/Driver/Pdo/AbstractPdoCommand.php b/src/Driver/Pdo/AbstractPdoCommand.php index c8348f832..bf3ae8252 100644 --- a/src/Driver/Pdo/AbstractPdoCommand.php +++ b/src/Driver/Pdo/AbstractPdoCommand.php @@ -186,7 +186,7 @@ protected function getQueryMode(int $queryMode): string * * It's a wrapper around {@see PDOStatement::execute()} to support transactions and retry handlers. * - * @param string|null $rawSql The rawSql if it has been created. + * @param string|null $rawSql Deprecated. Use `null` value. Will be removed in version 2.0.0. * * @throws Exception * @throws Throwable