2022-09-14 22:23:56 +08:00
|
|
|
parameters:
|
|
|
|
ignoreErrors:
|
|
|
|
# Remove this group below with larastan 2.0 (i.e Flarum 2.0)
|
2023-02-08 17:43:41 +08:00
|
|
|
- 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
|
2022-09-14 22:23:56 +08:00
|
|
|
|
|
|
|
# We ignore this because resolve can either take a class name as the generic return type or just a binding name.
|
2023-02-08 17:43:41 +08:00
|
|
|
- message: "#Template type T of function resolve[()]{2} is not referenced in a parameter.#"
|
|
|
|
reportUnmatched: false
|
2022-09-14 22:23:56 +08:00
|
|
|
|
|
|
|
# We ignore new static errors because we want extensibility.
|
|
|
|
# @TODO: needs discussion.
|
2023-02-08 17:43:41 +08:00
|
|
|
- message: "#^Unsafe usage of new static[()]{2}.$#"
|
|
|
|
reportUnmatched: false
|
2023-06-16 00:49:39 +08:00
|
|
|
- message: "#^Static access to instance property .*#"
|
|
|
|
reportUnmatched: false
|
2022-09-14 22:23:56 +08:00
|
|
|
|
|
|
|
# ConnectionInterface lacks methods that exist in the implementation,
|
|
|
|
# yet we don't want to inject the implementation.
|
2023-02-08 17:43:41 +08:00
|
|
|
- message: '#^Call to an undefined method Illuminate\\Database\\ConnectionInterface\:\:[A-z0-9_]+\(\)\.$#'
|
|
|
|
reportUnmatched: false
|
2023-05-30 18:36:12 +08:00
|
|
|
|
|
|
|
# By default when a callable parameter is typed with for example 3 parameters,
|
|
|
|
# and the implementation only accepts two of them, PHPStan complains.
|
|
|
|
# At the time of adding this error, there are no configuration values to make it
|
|
|
|
# ignore this error, so we have to ignore it globally.
|
|
|
|
- message: '#^Parameter \#[0-9]+ \$[A-z0-9_]+ of method Flarum\Extend\[A-z0-9_:\\()]+ expects \(?callable\([A-z0-9_,|\\: ()-]+\)\)?, (callable|Closure)\([A-z0-9_,|\\: ()-]+\) given\.$#'
|
|
|
|
reportUnmatched: false
|