diff --git a/.github/workflows/phpunits.yaml b/.github/workflows/phpunits.yaml index 595f351..aa35bc3 100644 --- a/.github/workflows/phpunits.yaml +++ b/.github/workflows/phpunits.yaml @@ -12,8 +12,8 @@ jobs: strategy: matrix: - php-versions: [8.2, 8.3] - laravel-versions: [^10.0, ^11.0] + php-versions: [8.2, 8.3, 8.4] + laravel-versions: [^10.0, ^11.0, ^12.0] services: clickhouse: diff --git a/composer.json b/composer.json index c8ecf3d..385c079 100644 --- a/composer.json +++ b/composer.json @@ -10,20 +10,20 @@ ], "require": { "php": "^8.2", - "laravel/framework": "^10.0|^11.0", + "laravel/framework": "^10.0|^11.0|^12.0", "the-tinderbox/clickhouse-builder": "^6.1", "ext-json": "*" }, "require-dev": { - "driftingly/rector-laravel": "^1.0", + "driftingly/rector-laravel": "^2.0", "ergebnis/phpstan-rules": "^2.1", "infection/infection": "~0.27", - "larastan/larastan": "^2.8", + "larastan/larastan": "^3.0", "nunomaduro/collision": "^8.0", - "orchestra/testbench": "^9.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "rector/rector": "^1.0", + "orchestra/testbench": "^9.0|^10.0|^11.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.5|^11.0", + "rector/rector": "^2.0", "symplify/easy-coding-standard": "^12.1", "mockery/mockery": "^1.6", "fakerphp/faker": "^1.23" diff --git a/src/Database/Eloquent/Builder.php b/src/Database/Eloquent/Builder.php index adc05ba..90e9638 100755 --- a/src/Database/Eloquent/Builder.php +++ b/src/Database/Eloquent/Builder.php @@ -207,7 +207,7 @@ public function whereKeyNot($id): self /** * Add a basic where clause to the query. * - * @param string|array|\Closure $column + * @param string|array|Closure $column * @param string $operator * @param mixed $value * @return $this @@ -229,7 +229,7 @@ public function where($column, $operator = null, $value = null, string $boolean /** * Add an "or where" clause to the query. * - * @param \Closure|array|string $column + * @param Closure|array|string $column * @param string $operator * @param mixed $value * @return $this @@ -283,7 +283,7 @@ public function find($id) /** * Find multiple models by their primary keys. * - * @param \Illuminate\Contracts\Support\Arrayable|array $ids + * @param Arrayable|array $ids */ public function findMany($ids): Collection { @@ -422,7 +422,6 @@ public function getRelation(string $name): Relation /** * Chunk the results of a query by comparing numeric IDs. * - * @param null $column * @param string|null $alias */ public function chunkById(int $count, callable $callback, $column = null, $alias = null): bool @@ -455,7 +454,7 @@ public function chunkById(int $count, callable $callback, $column = null, $alias } $lastId = $results->last() -->{$alias}; + ->{$alias}; unset($results); } while ($countResults === $count); @@ -506,7 +505,7 @@ public function paginate( $perPage = $perPage !== null && $perPage !== 0 ? $perPage : $this->model->getPerPage(); $results = ($total = $this->toBase()->getCountForPagination()) ? $this->forPage($page, $perPage) - ->get($columns) + ->get() : $this->model->newCollection(); return $this->paginator($results, $total, $perPage, $page, [ diff --git a/tests/Unit/Database/Eloquent/CollectionTest.php b/tests/Unit/Database/Eloquent/CollectionTest.php index 0a7581d..da034f8 100644 --- a/tests/Unit/Database/Eloquent/CollectionTest.php +++ b/tests/Unit/Database/Eloquent/CollectionTest.php @@ -136,10 +136,6 @@ public function testFind($key): void } } - /** - * @param null $operator - * @param null $value - */ #[\PHPUnit\Framework\Attributes\DataProvider('containsDataProvider')] public function testContains(bool $expected, $key, $operator = null, $value = null): void { diff --git a/tests/Unit/Database/Query/BuilderTest.php b/tests/Unit/Database/Query/BuilderTest.php index a31a1c1..7f8fd3e 100644 --- a/tests/Unit/Database/Query/BuilderTest.php +++ b/tests/Unit/Database/Query/BuilderTest.php @@ -14,7 +14,7 @@ use Tinderbox\ClickhouseBuilder\Query\Grammar; /** - * @property \Mockery\MockInterface|Connection connection + * @property MockInterface|Connection connection * @property Builder builder */ class BuilderTest extends TestCase