Skip to content

Commit

Permalink
Fix BC issues (#775)
Browse files Browse the repository at this point in the history
* Fix BC issues

* Remove BC test

* revert removing `Generator`

---------

Co-authored-by: Sergei Predvoditelev <[email protected]>
  • Loading branch information
Tigrov and vjik authored Nov 12, 2023
1 parent 63f68c0 commit 133d972
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/Query/QueryPartsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)'],
];
}
}

0 comments on commit 133d972

Please sign in to comment.