Skip to content

Commit

Permalink
ignore generic stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Nov 25, 2024
1 parent d9af319 commit 202d5b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ parameters:
# Relation forwards calls to Builder
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Builder<Illuminate\\Database\\Eloquent\\Model>|Illuminate\\Database\\Eloquent\\Relations\\Relation<Illuminate\\Database\\Eloquent\\Model>|Illuminate\\Database\\Query\\Builder::(orderBy|where|whereIn|whereNotIn|whereBetween|whereJsonContains|whereNotBetween)\(\)\.#'

# Laravel 11 added generics that are handled differently, so we just omit them
# Laravel 11 changes a lot of generics
- '#generic class (Illuminate\\Database\\Eloquent\\Builder|Laravel\\Scout\\Builder)( but)? does not specify its types#'
- '#contains generic type Illuminate\\Testing\\TestResponse<.+> but class Illuminate\\Testing\\TestResponse is not generic\.#'
- '#Generic type Illuminate\\Database\\Eloquent\\Relations\\HasMany<.+, .+> in PHPDoc tag @return specifies 2 template types, but class Illuminate\\Database\\Eloquent\\Relations\\HasMany supports only 1: TRelatedModel#'
- '#Method .+ should return Illuminate\\Database\\Eloquent\\Relations\\HasMany<(.+), .+> but returns Illuminate\\Database\\Eloquent\\Relations\\HasMany<\1>.#'

# This test cheats and uses reflection to make assertions
- path: tests/Unit/Schema/Directives/BaseDirectiveTest.php
Expand Down

0 comments on commit 202d5b9

Please sign in to comment.