File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 5959- Enh #393 : Refactor ` DMLQueryBuilder::upsert() ` method (@Tigrov )
6060- Chg #398 : Update expression namespaces according to changes in ` yiisoft/db ` package (@Tigrov )
6161- Enh #392 : Update ` DMLQueryBuilder::update() ` method to adapt changes in ` yiisoft/db ` (@rustamwin )
62+ - Enh #406 : Adapt to ` DQLQueryBuilderInterface::buildWithQueries() ` signature changes in ` yiisoft/db ` package (@vjik )
6263
6364## 1.2.0 March 21, 2024
6465
Original file line number Diff line number Diff line change 2222use Yiisoft \Db \Mssql \Builder \LongestBuilder ;
2323use Yiisoft \Db \Mssql \Builder \ShortestBuilder ;
2424use Yiisoft \Db \Query \Query ;
25+ use Yiisoft \Db \Query \WithQuery ;
2526use Yiisoft \Db \QueryBuilder \AbstractDQLQueryBuilder ;
2627use Yiisoft \Db \QueryBuilder \Condition \In ;
2728use Yiisoft \Db \QueryBuilder \Condition \Like ;
@@ -135,13 +136,17 @@ protected function extractAlias(string $table): array|bool
135136 return parent ::extractAlias ($ table );
136137 }
137138
138- public function buildWithQueries (array $ withs , array &$ params ): string
139+ public function buildWithQueries (array $ withQueries , array &$ params ): string
139140 {
140- /** @psalm-var array{query:string|Query, alias:ExpressionInterface|string, recursive:bool}[] $withs */
141- foreach ($ withs as &$ with ) {
142- $ with ['recursive ' ] = false ;
143- }
144-
145- return parent ::buildWithQueries ($ withs , $ params );
141+ $ withQueries = array_map (
142+ static fn (WithQuery $ withQuery ) => new WithQuery (
143+ $ withQuery ->query ,
144+ $ withQuery ->alias ,
145+ false
146+ ),
147+ $ withQueries ,
148+ );
149+
150+ return parent ::buildWithQueries ($ withQueries , $ params );
146151 }
147152}
You can’t perform that action at this time.
0 commit comments