diff --git a/CHANGELOG.md b/CHANGELOG.md index 8239831ed..af82ceefc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Enh #779: Specify result type of `QueryInterface::all()`, `CommandInterface::queryAll()` and `DbArrayHelper::populate()` methods to `array[]` (@vjik) - Enh #779: Specify populate closure type in `BatchQueryResultInterface` (@vjik) +- 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