From f6eae33aaf86b325cb057346db97647246921be3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:23:45 +0300 Subject: [PATCH 1/2] Remove `yiisoft/cache` and update `yiisoft/cache-file` to ^3.1 (#241) * Update yiisoft/cache-file requirement from ^2.0 to ^3.1 Updates the requirements on [yiisoft/cache-file](https://github.com/yiisoft/cache-file) to permit the latest version. - [Release notes](https://github.com/yiisoft/cache-file/releases) - [Changelog](https://github.com/yiisoft/cache-file/blob/master/CHANGELOG.md) - [Commits](https://github.com/yiisoft/cache-file/compare/2.0.0...3.1.0) --- updated-dependencies: - dependency-name: yiisoft/cache-file dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Remove yiisoft/cache --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergei Predvoditelev --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6ac5d3f..20f20d2 100644 --- a/composer.json +++ b/composer.json @@ -32,8 +32,7 @@ "spatie/phpunit-watcher": "^1.23", "vimeo/psalm": "^4.3|^5.6", "yiisoft/aliases": "^2.0", - "yiisoft/cache": "^2.0", - "yiisoft/cache-file": "^2.0", + "yiisoft/cache-file": "^3.1", "yiisoft/var-dumper": "^1.5" }, "autoload": { From 245d3ee5161f82023381456ef373b626a13b4725 Mon Sep 17 00:00:00 2001 From: Sergei Tigrov Date: Sat, 14 Oct 2023 14:44:35 +0700 Subject: [PATCH 2/2] Fix CTE query expressions (#240) * Fix CTE * Fix psalm issue * Fix psalm issue --- CHANGELOG.md | 1 + src/DQLQueryBuilder.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 350db64..aef34e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.1.1 under development - Enh #230: Improve column type #230 (@Tigrov) +- Bug #240: Remove `RECURSIVE` expression from CTE queries (@Tigrov) ## 1.1.0 July 24, 2023 diff --git a/src/DQLQueryBuilder.php b/src/DQLQueryBuilder.php index b0d2aa2..d8ce2d3 100644 --- a/src/DQLQueryBuilder.php +++ b/src/DQLQueryBuilder.php @@ -7,6 +7,7 @@ use Yiisoft\Db\Expression\ExpressionInterface; use Yiisoft\Db\Oracle\Builder\InConditionBuilder; use Yiisoft\Db\Oracle\Builder\LikeConditionBuilder; +use Yiisoft\Db\Query\Query; use Yiisoft\Db\QueryBuilder\AbstractDQLQueryBuilder; use Yiisoft\Db\QueryBuilder\Condition\InCondition; use Yiisoft\Db\QueryBuilder\Condition\LikeCondition; @@ -60,6 +61,16 @@ public function selectExists(string $rawSql): string return 'SELECT CASE WHEN EXISTS(' . $rawSql . ') THEN 1 ELSE 0 END FROM DUAL'; } + public function buildWithQueries(array $withs, array &$params): string + { + /** @psalm-var array{query:string|Query, alias:ExpressionInterface|string, recursive:bool}[] $withs */ + foreach ($withs as &$with) { + $with['recursive'] = false; + } + + return parent::buildWithQueries($withs, $params); + } + protected function defaultExpressionBuilders(): array { return array_merge(