Skip to content

Commit 102ee3a

Browse files
authored
Deprecate unnecessary argument $rawSql of AbstractCommand::internalExecute() (#778)
1 parent 6845a40 commit 102ee3a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## 1.2.1 under development
44

5-
- Bug #777: Fix `Query::count()` when it returns an incorrect value if the result is greater
6-
than `PHP_INT_MAX` (@Tigrov)
5+
- Bug #777: Fix `Query::count()` when it returns an incorrect value if the result is greater than `PHP_INT_MAX` (@Tigrov)
6+
- Enh #778: Deprecate unnecessary argument `$rawSql` of `AbstractCommand::internalExecute()` (@Tigrov)
77

88
## 1.2.0 November 12, 2023
99

src/Command/AbstractCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ abstract protected function internalGetQueryResult(int $queryMode): mixed;
548548
/**
549549
* Executes a prepared statement.
550550
*
551-
* @param string|null $rawSql The rawSql if it has been created.
551+
* @param string|null $rawSql Deprecated. Use `null` value. Will be removed in version 2.0.0.
552552
*
553553
* @throws Exception
554554
* @throws Throwable
@@ -581,7 +581,7 @@ protected function queryInternal(int $queryMode): mixed
581581
$isReadMode = $this->isReadMode($queryMode);
582582
$this->prepare($isReadMode);
583583

584-
$this->internalExecute($this->getRawSql());
584+
$this->internalExecute(null);
585585

586586
/** @psalm-var mixed $result */
587587
$result = $this->internalGetQueryResult($queryMode);

src/Driver/Pdo/AbstractPdoCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ protected function getQueryMode(int $queryMode): string
186186
*
187187
* It's a wrapper around {@see PDOStatement::execute()} to support transactions and retry handlers.
188188
*
189-
* @param string|null $rawSql The rawSql if it has been created.
189+
* @param string|null $rawSql Deprecated. Use `null` value. Will be removed in version 2.0.0.
190190
*
191191
* @throws Exception
192192
* @throws Throwable

0 commit comments

Comments
 (0)