diff --git a/app/Nova/Resource.php b/app/Nova/Resource.php index 239ac1f1f..84d940d9e 100644 --- a/app/Nova/Resource.php +++ b/app/Nova/Resource.php @@ -30,7 +30,7 @@ abstract class Resource extends NovaResource * * @param \Laravel\Scout\Builder $query * - * @phan-suppress PhanUndeclaredConstantOfClass + * @phan-suppress PhanTypeExpectedObjectOrClassName */ public static function scoutQuery(NovaRequest $request, $query): Builder { diff --git a/app/Nova/User.php b/app/Nova/User.php index 195e002fa..8be3c1c28 100644 --- a/app/Nova/User.php +++ b/app/Nova/User.php @@ -849,7 +849,8 @@ private static function adminCanRun(NovaRequest $request): bool /** * Build a Scout search query for the given resource. * - * @param \Laravel\Scout\Builder $query + * @param \Laravel\Scout\Builder<\App\Models\User> $query + * @return \Laravel\Scout\Builder<\App\Models\User> */ public static function scoutQuery(NovaRequest $request, $query): \Laravel\Scout\Builder { diff --git a/composer.json b/composer.json index 41e79be4b..668819fb4 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "laravel/horizon": "5.27.1", "laravel/nova": "4.35.1", "laravel/passport": "12.3.0", - "laravel/scout": "10.11.1", + "laravel/scout": "10.11.2", "laravel/slack-notification-channel": "3.3.1", "laravel/socialite": "5.15.1", "laravel/tinker": "2.9.0", diff --git a/composer.lock b/composer.lock index c32b16d84..9716ef0a0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "60232dfd3aed8b7ff782a9887454c302", + "content-hash": "0c324c1519b3764257f234cc4288c1fa", "packages": [ { "name": "ans-group/laravel-health-check", @@ -3572,16 +3572,16 @@ }, { "name": "laravel/scout", - "version": "v10.11.1", + "version": "v10.11.2", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "b31056d49ae0540a475947391d7ea8617d779aee" + "reference": "74f007d0f5b78f589014899094f7ddb4855b771d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/b31056d49ae0540a475947391d7ea8617d779aee", - "reference": "b31056d49ae0540a475947391d7ea8617d779aee", + "url": "https://api.github.com/repos/laravel/scout/zipball/74f007d0f5b78f589014899094f7ddb4855b771d", + "reference": "74f007d0f5b78f589014899094f7ddb4855b771d", "shasum": "" }, "require": { @@ -3646,7 +3646,7 @@ "issues": "https://github.com/laravel/scout/issues", "source": "https://github.com/laravel/scout" }, - "time": "2024-08-06T15:13:57+00:00" + "time": "2024-09-03T15:30:25+00:00" }, { "name": "laravel/serializable-closure", diff --git a/phpstan.neon b/phpstan.neon index 15f760106..78b5c9d97 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -104,6 +104,8 @@ parameters: - '#Method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) return type with generic class Illuminate\\Database\\Eloquent\\Builder does not specify its types: TModelClass#' - '#Method App\\Nova\\Filters\\[a-zA-Z]+::options\(\) should return array but returns array\.#' - '#Method App\\Nova\\Metrics\\TotalCollections::query\(\) return type with generic class Illuminate\\Database\\Eloquent\\Builder does not specify its types: TModelClass#' + - '#Method App\\Nova\\Resource::scoutQuery\(\) has parameter \$query with generic class Laravel\\Scout\\Builder but does not specify its types: TModel#' + - '#Method App\\Nova\\Resource::scoutQuery\(\) return type with generic class Laravel\\Scout\\Builder does not specify its types: TModel#' - '#Method App\\Nova\\Travel::showFieldOnForms\(\) has parameter \$formData with generic class Laravel\\Nova\\Fields\\FormData but does not specify its types: TKey, TValue#' - '#Method App\\Util\\DocuSign::getAccessToken\(\) should return string but returns mixed\.#' - '#Method App\\Util\\Matrix::[a-zA-Z]+\(\) has parameter \$decoded_itinerary with no value type specified in iterable type array\.#' @@ -240,6 +242,7 @@ parameters: - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Contracts\\Filter::apply\(\)#' - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Filters\\[a-zA-Z]+::apply\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Filters\\Filter::apply\(\)#' - '#Parameter \#2 \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method App\\Nova\\Lenses\\RecentInactiveUsers::query\(\) should be contravariant with parameter \$query \(Illuminate\\Database\\Eloquent\\Builder\) of method Laravel\\Nova\\Lenses\\Lens::query\(\)#' + - '#Parameter \#2 \$query \(Laravel\\Scout\\Builder\) of method App\\Nova\\User::scoutQuery\(\) should be contravariant with parameter \$query \(Laravel\\Scout\\Builder\) of method App\\Nova\\Resource::scoutQuery\(\)#' - '#Parameter \#2 \$requestedRelationships of static method App\\Util\\AuthorizeInclude::authorize\(\) expects string\|null, mixed given\.#' - '#Parameter \#2 \$signatureHeader of static method Square\\Utils\\WebhooksHelper::isValidWebhookEventSignature\(\) expects string, string\|null given\.#' - '#Parameter \#2 \$string of function explode expects string, mixed given\.#' diff --git a/psalm.xml b/psalm.xml index c480f6834..163f4a711 100644 --- a/psalm.xml +++ b/psalm.xml @@ -314,6 +314,7 @@ +