-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(phpstab): adapt phpstan package for extension use (#3727)
- fix "Stub file does not exist" error message as reported in <flarum/docs#441 (comment)> - fix "Ignored error pattern was not matched in reported errors" error messages as reported in <flarum/docs#441 (comment)>
- Loading branch information
Showing
2 changed files
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |