Skip to content

Commit 133d972

Browse files
Tigrovvjik
andauthored
Fix BC issues (#775)
* Fix BC issues * Remove BC test * revert removing `Generator` --------- Co-authored-by: Sergei Predvoditelev <[email protected]>
1 parent 63f68c0 commit 133d972

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

.github/workflows/bc.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
on:
22
pull_request:
3-
paths-ignore:
4-
- 'docs/**'
5-
- 'README.md'
6-
- 'CHANGELOG.md'
7-
- '.gitignore'
8-
- '.gitattributes'
9-
- 'infection.json.dist'
10-
- 'phpunit.xml.dist'
11-
- 'psalm.xml'
3+
paths:
4+
- 'src/**'
5+
- '.github/workflows/bc.yml'
6+
- 'composer.json'
127
push:
138
branches: ['master']
14-
paths-ignore:
15-
- 'docs/**'
16-
- 'README.md'
17-
- 'CHANGELOG.md'
18-
- '.gitignore'
19-
- '.gitattributes'
20-
- 'infection.json.dist'
21-
- 'phpunit.xml.dist'
22-
- 'psalm.xml'
9+
paths:
10+
- 'src/**'
11+
- '.github/workflows/bc.yml'
12+
- 'composer.json'
2313

2414
name: backwards compatibility
2515

src/Query/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public function where(array|string|ExpressionInterface|null $condition, array $p
662662
return $this;
663663
}
664664

665-
public function withQuery(QueryInterface|string $query, ExpressionInterface|string $alias, bool $recursive = false): static
665+
public function withQuery(QueryInterface|string $query, string $alias, bool $recursive = false): static
666666
{
667667
$this->withQueries[] = ['query' => $query, 'alias' => $alias, 'recursive' => $recursive];
668668
return $this;

src/Query/QueryPartsInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,10 @@ public function where(array|string|ExpressionInterface|null $condition, array $p
645645
* Prepends an SQL statement using `WITH` syntax.
646646
*
647647
* @param QueryInterface|string $query The SQL statement to append using `UNION`.
648-
* @param ExpressionInterface|string $alias The query alias in `WITH` construction.
649-
* To specify the alias in plain SQL, you may pass an instance of {@see ExpressionInterface}.
648+
* @param string $alias The query alias in `WITH` construction.
650649
* @param bool $recursive Its `true` if using `WITH RECURSIVE` and `false` if using `WITH`.
651650
*/
652-
public function withQuery(QueryInterface|string $query, ExpressionInterface|string $alias, bool $recursive = false): static;
651+
public function withQuery(QueryInterface|string $query, string $alias, bool $recursive = false): static;
653652

654653
/**
655654
* Specifies the `WITH` query clause for the query.

tests/Provider/QueryBuilderProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,6 @@ public static function cteAliases(): array
12581258
'with one column' => ['a(b)', '[[a]]([[b]])'],
12591259
'with columns' => ['a(b,c,d)', '[[a]]([[b]], [[c]], [[d]])'],
12601260
'with extra space' => ['a(b,c,d) ', 'a(b,c,d) '],
1261-
'expression' => [new Expression('a(b,c,d)'), 'a(b,c,d)'],
12621261
];
12631262
}
12641263
}

0 commit comments

Comments
 (0)