Skip to content

Commit

Permalink
PHPStan: Ignore "Dynamic call to static method" errors
Browse files Browse the repository at this point in the history
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 phpstan/phpstan-strict-rules#140
See larastan/larastan#1272
  • Loading branch information
Phil Bates committed Jan 31, 2024
1 parent 848d56d commit a469607
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ parameters:
level: 9
excludePaths:
- bootstrap/cache/
strictRules:
# TODO remove when https://github.com/phpstan/phpstan-strict-rules/issues/140 is resolved
# See also: https://github.com/larastan/larastan/issues/1272
strictCalls: false

0 comments on commit a469607

Please sign in to comment.