laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.53k stars 11.02k forks source link

Call to an undefined static method Illuminate\Support\Facades\Queue::after() #37538

Closed jbruni closed 3 years ago

jbruni commented 3 years ago

Description:

Code is available in documentation:

When running phpstan level 3, it complains:

Call to an undefined static method Illuminate\Support\Facades\Queue::after()

It is possible to workaround it using app('queue')->after() instead of Queue::after(), but it would be nice to have the documentation example passing the static code analysis.

All the other usages of Facades in the application pass the static code analysis (eg, Storage::disk()) - making me believe this is a "fixable" issue.

Steps To Reproduce:

Code is available in documentation:

To install PHPStan: composer require --dev phpstan/phpstan

This is the script in composer.json:

    "scripts": {
        "phpstan": "phpstan analyse --level 3 app",
    }

To run it: composer run phpstan

driesvints commented 3 years ago

Hey @jbruni. We don't optimize for tools like phpstan. If you think there's a bug we're welcoming PRs. Thanks.