diff --git a/larastan-extension.neon b/larastan-extension.neon index bf75e3c..3a2d846 100644 --- a/larastan-extension.neon +++ b/larastan-extension.neon @@ -1,36 +1,36 @@ parameters: stubFiles: - - ../../vendor/nunomaduro/larastan/stubs/Enumerable.stub - - ../../vendor/nunomaduro/larastan/stubs/EloquentBuilder.stub - - ../../vendor/nunomaduro/larastan/stubs/Collection.stub - - ../../vendor/nunomaduro/larastan/stubs/EloquentCollection.stub - - ../../vendor/nunomaduro/larastan/stubs/Factory.stub - - ../../vendor/nunomaduro/larastan/stubs/Model.stub - - ../../vendor/nunomaduro/larastan/stubs/Gate.stub - - ../../vendor/nunomaduro/larastan/stubs/Relation.stub - - ../../vendor/nunomaduro/larastan/stubs/BelongsTo.stub - - ../../vendor/nunomaduro/larastan/stubs/BelongsToMany.stub - - ../../vendor/nunomaduro/larastan/stubs/HasOneOrMany.stub - - ../../vendor/nunomaduro/larastan/stubs/HasMany.stub - - ../../vendor/nunomaduro/larastan/stubs/HasOne.stub - - ../../vendor/nunomaduro/larastan/stubs/HasOneThrough.stub - - ../../vendor/nunomaduro/larastan/stubs/HasManyThrough.stub - - ../../vendor/nunomaduro/larastan/stubs/Mailable.stub - - ../../vendor/nunomaduro/larastan/stubs/MorphOne.stub - - ../../vendor/nunomaduro/larastan/stubs/MorphOneOrMany.stub - - ../../vendor/nunomaduro/larastan/stubs/MorphTo.stub - - ../../vendor/nunomaduro/larastan/stubs/MorphToMany.stub - - ../../vendor/nunomaduro/larastan/stubs/MorphMany.stub - - ../../vendor/nunomaduro/larastan/stubs/Helpers.stub - - ../../vendor/nunomaduro/larastan/stubs/HigherOrderProxies.stub - - ../../vendor/nunomaduro/larastan/stubs/QueryBuilder.stub - - ../../vendor/nunomaduro/larastan/stubs/Facades.stub - - ../../vendor/nunomaduro/larastan/stubs/Pagination.stub - - ../../vendor/nunomaduro/larastan/stubs/Contracts/Pagination.stub - - ../../vendor/nunomaduro/larastan/stubs/Contracts/Support.stub - - ../../vendor/nunomaduro/larastan/stubs/Redis/Connection.stub - - ../../vendor/nunomaduro/larastan/stubs/Logger.stub - - ../../vendor/nunomaduro/larastan/stubs/EnumeratesValues.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Enumerable.stub + - %rootDir%/../../nunomaduro/larastan/stubs/EloquentBuilder.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Collection.stub + - %rootDir%/../../nunomaduro/larastan/stubs/EloquentCollection.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Factory.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Model.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Gate.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Relation.stub + - %rootDir%/../../nunomaduro/larastan/stubs/BelongsTo.stub + - %rootDir%/../../nunomaduro/larastan/stubs/BelongsToMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HasOneOrMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HasMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HasOne.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HasOneThrough.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HasManyThrough.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Mailable.stub + - %rootDir%/../../nunomaduro/larastan/stubs/MorphOne.stub + - %rootDir%/../../nunomaduro/larastan/stubs/MorphOneOrMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/MorphTo.stub + - %rootDir%/../../nunomaduro/larastan/stubs/MorphToMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/MorphMany.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Helpers.stub + - %rootDir%/../../nunomaduro/larastan/stubs/HigherOrderProxies.stub + - %rootDir%/../../nunomaduro/larastan/stubs/QueryBuilder.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Facades.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Pagination.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Contracts/Pagination.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Contracts/Support.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Redis/Connection.stub + - %rootDir%/../../nunomaduro/larastan/stubs/Logger.stub + - %rootDir%/../../nunomaduro/larastan/stubs/EnumeratesValues.stub universalObjectCratesClasses: - Illuminate\Http\Request earlyTerminatingFunctionCalls: diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6a0b138..c6fbed8 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,17 +1,23 @@ parameters: ignoreErrors: # Remove this group below with larastan 2.0 (i.e Flarum 2.0) - - "#Relation '[A-z_-]+' is not found in [A-z\_]+ model.#" - - '#^Parameter \#1 \$query of method [A-z_<>\\]+\:\:union\(\) expects [A-z_<> .,|\\]+ given\.$#' - - '#^Parameter \#1 \$query of method [A-z_<>\\]+\:\:joinSub\(\) expects [A-z_<> .,|\\]+ given\.$#' + - message: "#Relation '[A-z_-]+' is not found in [A-z\_]+ model.#" + reportUnmatched: false + - message: '#^Parameter \#1 \$query of method [A-z_<>\\]+\:\:union\(\) expects [A-z_<> .,|\\]+ given\.$#' + reportUnmatched: false + - message: '#^Parameter \#1 \$query of method [A-z_<>\\]+\:\:joinSub\(\) expects [A-z_<> .,|\\]+ given\.$#' + reportUnmatched: false # We ignore this because resolve can either take a class name as the generic return type or just a binding name. - - "#Template type T of function resolve[()]{2} is not referenced in a parameter.#" + - message: "#Template type T of function resolve[()]{2} is not referenced in a parameter.#" + reportUnmatched: false # We ignore new static errors because we want extensibility. # @TODO: needs discussion. - - "#^Unsafe usage of new static[()]{2}.$#" + - message: "#^Unsafe usage of new static[()]{2}.$#" + reportUnmatched: false # ConnectionInterface lacks methods that exist in the implementation, # yet we don't want to inject the implementation. - - '#^Call to an undefined method Illuminate\\Database\\ConnectionInterface\:\:[A-z0-9_]+\(\)\.$#' + - message: '#^Call to an undefined method Illuminate\\Database\\ConnectionInterface\:\:[A-z0-9_]+\(\)\.$#' + reportUnmatched: false