Skip to content

Commit c461bc9

Browse files
authored
Merge branch 'master' into php85
2 parents 9f492ea + a2fb23b commit c461bc9

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
- Chg #1106: Remove parameters from `PdoConnectionInterface::getActivePdo()` method (@vjik)
180180
- Bug #1109: Fix column definition parsing in cases with brackets and escaped quotes (@vjik)
181181
- New #1107: Add abstract enumeration column type (@vjik)
182+
- Bug #1115: Do not reset `$retryHandler` property on `AbstractCommand::reset()` method call (@Tigrov)
182183

183184
## 1.3.0 March 21, 2024
184185

UPGRADE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,4 @@ Each table column has its own class in the `Yiisoft\Db\Schema\Column` namespace
293293
- Change `QueryPartsInterface::withQueries()` parameter to variadic with type `WithQuery`;
294294
- In `DQLQueryBuilderInterface::buildWithQueries()` method change first parameter type form `array[]` to `WithQuery[]`;
295295
- Remove `AbstractCommand::refreshTableSchema()` method;
296+
- Property `$retryHandler` is not reset on `AbstractCommand::reset()` method call;

src/Command/AbstractCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,6 @@ protected function reset(): void
639639
$this->sql = '';
640640
$this->params = [];
641641
$this->refreshTableName = null;
642-
$this->retryHandler = null;
643642
}
644643

645644
/**

tests/Db/Command/CommandTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,12 @@ public function testSetRetryHandler(): void
582582
$command->setRetryHandler($handler);
583583

584584
$this->assertSame($handler, Assert::getPropertyValue($command, 'retryHandler'));
585+
586+
// Test that setting SQL and raw SQL does not change the retry handler.
587+
$command->setSql('');
588+
$command->setRawSql('');
589+
590+
$this->assertSame($handler, Assert::getPropertyValue($command, 'retryHandler'));
585591
}
586592

587593
public function testTruncateTable(): void

0 commit comments

Comments
 (0)