diff --git a/.github/workflows/comaptibility.yml b/.github/workflows/comaptibility.yml index 9fcab74..4c9e454 100644 --- a/.github/workflows/comaptibility.yml +++ b/.github/workflows/comaptibility.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] laravel: [11.x-dev] testbench: [9.*] diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 5226307..dee75d6 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -12,7 +12,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.4' extensions: fileinfo, pdo coverage: none diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index c0eb0b9..40e7295 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.0, 8.1, 8.2, 8.3] + php: [8.0, 8.1, 8.2, 8.3, 8.4] laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*] stability: [prefer-lowest, prefer-stable] include: @@ -57,6 +57,16 @@ jobs: - php: 8.3 laravel: 9.* stability: prefer-lowest + - php: 8.4 + laravel: 6.* + - php: 8.4 + laravel: 7.* + - php: 8.4 + laravel: 8.* + stability: prefer-lowest + - php: 8.4 + laravel: 9.* + stability: prefer-lowest - laravel: 11.* php: 8.0 - laravel: 11.* diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 0e0b083..ca72f42 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -17,7 +17,7 @@ '@Symfony' => true, 'binary_operator_spaces' => ['operators' => ['|' => null]], // https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5495 'global_namespace_import' => false, - 'nullable_type_declaration_for_default_null_value' => false, + 'nullable_type_declaration_for_default_null_value' => true, 'ordered_class_elements' => [ 'order' => [ 'use_trait', diff --git a/src/PostgresConnectionBackport.php b/src/PostgresConnectionBackport.php index ba3f33b..9fd3b7f 100644 --- a/src/PostgresConnectionBackport.php +++ b/src/PostgresConnectionBackport.php @@ -15,7 +15,7 @@ trait PostgresConnectionBackport /** * All of the callbacks that should be invoked before a query is executed. * - * @var \Closure[] + * @var Closure[] */ protected $beforeExecutingCallbacks = []; diff --git a/src/Query/BuilderReturning.php b/src/Query/BuilderReturning.php index 9dc829b..812b6cc 100644 --- a/src/Query/BuilderReturning.php +++ b/src/Query/BuilderReturning.php @@ -16,7 +16,7 @@ trait BuilderReturning /** * Delete records from the database. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function deleteReturning(mixed $id = null, array $returning = ['*']): Collection { @@ -44,7 +44,7 @@ public function deleteReturning(mixed $id = null, array $returning = ['*']): Col /** * Insert new records into the database while ignoring errors. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function insertOrIgnoreReturning(array $values, array $returning = ['*']): Collection { @@ -80,7 +80,7 @@ public function insertOrIgnoreReturning(array $values, array $returning = ['*']) /** * Insert new records into the database. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function insertReturning(array $values, array $returning = ['*']): Collection { @@ -128,7 +128,7 @@ public function insertReturning(array $values, array $returning = ['*']): Collec * * @param \Closure|\Illuminate\Contracts\Database\Query\Builder|string $query * - * @return \Illuminate\Support\Collection + * @return Collection */ public function insertUsingReturning(array $columns, $query, array $returning = ['*']): Collection { @@ -153,7 +153,7 @@ public function insertUsingReturning(array $columns, $query, array $returning = /** * Update records in a PostgreSQL database using the update from syntax. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function updateFromReturning(array $values, array $returning = ['*']): Collection { @@ -176,7 +176,7 @@ public function updateFromReturning(array $values, array $returning = ['*']): Co /** * Insert or update a record matching the attributes, and fill it with values. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function updateOrInsertReturning(array $attributes, array $values = [], array $returning = ['*']): Collection { @@ -194,7 +194,7 @@ public function updateOrInsertReturning(array $attributes, array $values = [], a /** * Update records in the database. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function updateReturning(array $values, array $returning = ['*']): Collection { @@ -217,7 +217,7 @@ public function updateReturning(array $values, array $returning = ['*']): Collec /** * Insert new records or update the existing ones. * - * @return \Illuminate\Support\Collection + * @return Collection */ public function upsertReturning(array $values, array|string $uniqueBy, ?array $update = null, array $returning = ['*']): Collection { diff --git a/src/Schema/Builder.php b/src/Schema/Builder.php index 9344213..e657fe4 100644 --- a/src/Schema/Builder.php +++ b/src/Schema/Builder.php @@ -31,7 +31,7 @@ public function getConnection(): PostgresEnhancedConnection * * @param string $table */ - protected function createBlueprint($table, Closure $callback = null): Blueprint + protected function createBlueprint($table, ?Closure $callback = null): Blueprint { return new Blueprint($table, $callback); } diff --git a/src/Schema/BuilderDomain.php b/src/Schema/BuilderDomain.php index e0d3272..943aa2c 100644 --- a/src/Schema/BuilderDomain.php +++ b/src/Schema/BuilderDomain.php @@ -31,7 +31,7 @@ public function changeDomainConstraint(string $name, Closure|string|null $check) /** * Create a new domain in the schema. */ - public function createDomain(string $name, string $type, Closure|string $check = null): void + public function createDomain(string $name, string $type, Closure|string|null $check = null): void { if ($check instanceof Closure) { $query = tap($this->getConnection()->query(), $check);