File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454- Enh #423 : Refactor ` DMLQueryBuilder::upsert() ` method (@Tigrov )
5555- Chg #428 : Update expression namespaces according to changes in ` yiisoft/db ` package (@Tigrov )
5656- Enh #432 , #433 : Update ` DMLQueryBuilder::update() ` method to adapt changes in ` yiisoft/db ` (@rustamwin , @Tigrov )
57+ - Enh #439 : Move "Packets out of order" warning suppression from Yii DB (@vjik )
5758
5859## 1.2.0 March 21, 2024
5960
Original file line number Diff line number Diff line change 1212use Yiisoft \Db \Query \QueryInterface ;
1313
1414use function in_array ;
15+ use function restore_error_handler ;
16+ use function set_error_handler ;
1517use function str_starts_with ;
1618use function substr ;
1719
@@ -146,4 +148,19 @@ public function showDatabases(): array
146148
147149 return $ this ->setSql ($ sql )->queryColumn ();
148150 }
151+
152+ protected function pdoStatementExecute (): void
153+ {
154+ set_error_handler (
155+ static fn (int $ errorNumber , string $ errorString ): bool =>
156+ str_starts_with ($ errorString , 'Packets out of order. Expected ' ),
157+ E_WARNING ,
158+ );
159+
160+ try {
161+ $ this ->pdoStatement ?->execute();
162+ } finally {
163+ restore_error_handler ();
164+ }
165+ }
149166}
You can’t perform that action at this time.
0 commit comments