Skip to content

Commit

Permalink
chore: better PHPStan support (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeriyoshi authored Dec 25, 2024
1 parent 9be524f commit c21ad52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v8.3.0 (2024-11-08)
# v8.3.0 (2024-12-25)

- add support for full text search (#235)
- add support for IDENTITY columns (#243)
Expand All @@ -10,6 +10,7 @@
- add support for `Query\Builder::whereNotInUnnest(...)` (#225)
- `Query\Builder::whereIn` will now wrap values in `UNNEST` if the number of values exceeds the limit (950). (#226)
- Commit options can now be set through config or through `Connection::setCommitOptions(...)` (#229)
- improve PHPStan support (#244)

# v8.2.0 (2024-08-05)

Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ parameters:
path: src/Connection.php
- message: '#^Method Colopl\\Spanner\\Connection::selectWithOptions\(\) should return array<int, array> but returns mixed\.$#'
path: src/Connection.php
- message: "#^Method Colopl\\\\Spanner\\\\Connection\\:\\:cursor\\(\\) should return Generator\\<int, stdClass, mixed, mixed\\> but returns Generator\\<int, array, mixed, mixed\\>\\.$#"
path: src/Connection.php
- message: "#^Return type \\(Generator\\<int, array, mixed, mixed\\>\\) of method Colopl\\\\Spanner\\\\Connection\\:\\:cursor\\(\\) should be compatible with return type \\(Generator\\<int, stdClass, mixed, mixed\\>\\) of method Illuminate\\\\Database\\\\Connection\\:\\:cursor\\(\\)$#"
count: 1
path: src/Connection.php
- message: '#^Generator expects value type array, mixed given.$#'
path: src/Connection.php
count: 1
Expand Down
3 changes: 2 additions & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ public function select($query, $bindings = [], $useReadPdo = true): array
}

/**
* @inheritDoc
* {@inheritDoc}
* @return Generator<int, array<array-key, mixed>>
*/
public function cursor($query, $bindings = [], $useReadPdo = true): Generator
{
Expand Down
4 changes: 4 additions & 0 deletions src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Query\Builder as BaseBuilder;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use LogicException;

/**
* @method Collection<int, array<array-key, mixed>> get($columns = ['*'])
*/
class Builder extends BaseBuilder
{
use Concerns\SetsRequestTimeouts;
Expand Down

0 comments on commit c21ad52

Please sign in to comment.