From 3f70576181416128c233bb0b99ea63f1cf7b6617 Mon Sep 17 00:00:00 2001 From: Phil Bates Date: Sat, 27 Jan 2024 10:31:36 +0000 Subject: [PATCH] PHPStan: Ignore "Dynamic call to static method" errors The following route: Route::get('/', function(\Illuminate\Contracts\Filesystem\Filesystem $factory) { return $factory->download('foo.csv'); }); currently results in the following false-positive error: ------ ------------------------------------------------------------------------------------ Line routes/web.php ------ ------------------------------------------------------------------------------------ 22 Dynamic call to static method Illuminate\Filesystem\FilesystemAdapter::download(). ------ ------------------------------------------------------------------------------------ See https://github.com/phpstan/phpstan-strict-rules/issues/140 --- phpstan.neon.dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0db6c69..c5f72e1 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -16,3 +16,6 @@ parameters: level: 9 excludePaths: - bootstrap/cache/ + ignoreErrors: + # TODO remove when https://github.com/phpstan/phpstan-strict-rules/issues/140 is resolved + - '#^Dynamic call to static method#'