Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan: Ignore "Dynamic call to static method" errors #15

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

philbates35
Copy link
Owner

@philbates35 philbates35 commented Jan 27, 2024

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

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
@philbates35 philbates35 merged commit 941fb35 into main Jan 31, 2024
11 checks passed
@philbates35 philbates35 deleted the phpstan-ignore-error branch January 31, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant