diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index 00041a9f4..5970206c9 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -1,25 +1,15 @@ on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + paths: + - 'src/**' + - '.github/workflows/bc.yml' + - 'composer.json' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + paths: + - 'src/**' + - '.github/workflows/bc.yml' + - 'composer.json' name: backwards compatibility diff --git a/src/Query/Query.php b/src/Query/Query.php index 4ba681e7b..98e69b962 100644 --- a/src/Query/Query.php +++ b/src/Query/Query.php @@ -662,7 +662,7 @@ public function where(array|string|ExpressionInterface|null $condition, array $p return $this; } - public function withQuery(QueryInterface|string $query, ExpressionInterface|string $alias, bool $recursive = false): static + public function withQuery(QueryInterface|string $query, string $alias, bool $recursive = false): static { $this->withQueries[] = ['query' => $query, 'alias' => $alias, 'recursive' => $recursive]; return $this; diff --git a/src/Query/QueryPartsInterface.php b/src/Query/QueryPartsInterface.php index 8c3ddfd84..f6b9ca974 100644 --- a/src/Query/QueryPartsInterface.php +++ b/src/Query/QueryPartsInterface.php @@ -645,11 +645,10 @@ public function where(array|string|ExpressionInterface|null $condition, array $p * Prepends an SQL statement using `WITH` syntax. * * @param QueryInterface|string $query The SQL statement to append using `UNION`. - * @param ExpressionInterface|string $alias The query alias in `WITH` construction. - * To specify the alias in plain SQL, you may pass an instance of {@see ExpressionInterface}. + * @param string $alias The query alias in `WITH` construction. * @param bool $recursive Its `true` if using `WITH RECURSIVE` and `false` if using `WITH`. */ - public function withQuery(QueryInterface|string $query, ExpressionInterface|string $alias, bool $recursive = false): static; + public function withQuery(QueryInterface|string $query, string $alias, bool $recursive = false): static; /** * Specifies the `WITH` query clause for the query. diff --git a/tests/Provider/QueryBuilderProvider.php b/tests/Provider/QueryBuilderProvider.php index 8e04fc7b5..a70696668 100644 --- a/tests/Provider/QueryBuilderProvider.php +++ b/tests/Provider/QueryBuilderProvider.php @@ -1258,7 +1258,6 @@ public static function cteAliases(): array 'with one column' => ['a(b)', '[[a]]([[b]])'], 'with columns' => ['a(b,c,d)', '[[a]]([[b]], [[c]], [[d]])'], 'with extra space' => ['a(b,c,d) ', 'a(b,c,d) '], - 'expression' => [new Expression('a(b,c,d)'), 'a(b,c,d)'], ]; } }