psalm / psalm-plugin-laravel

A Psalm plugin for Laravel
MIT License
306 stars 71 forks source link

ERROR: ReservedWord #197

Closed rabol closed 2 years ago

rabol commented 3 years ago

Describe the bug while running psalm with the laravel plugin enabled I get the following error:

ERROR: ReservedWord - app/Classes/SignPDF.php:129:70 - null is a reserved word (see https://psalm.dev/095)
    public function signature(array $info = [], int $cert_type = 3): string|null|BinaryFileResponse

Impacted Versions Please paste the output of composer show | grep -E 'psalm|laravel' so we can see what versions are impacted

akaunting/laravel-setting                      1.2.7          Persistent settings package for Laravel
barryvdh/laravel-debugbar                      v3.6.2         PHP Debugbar integration for Laravel
barryvdh/laravel-ide-helper                    v2.9.1         Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.
bensampo/laravel-enum                          v3.4.1         Simple, extensible and powerful enumeration implementation for Laravel.
dcblogdev/laravel-dropbox                      v3.0.3         A Laravel Dropbox v2 package
fruitcake/laravel-cors                         v2.0.4         Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
glorand/laravel-model-settings                 4.2.2          Model Settings for your Laravel app
laravel/framework                              v8.58.0        The Laravel Framework.
laravel/sanctum                                v2.11.2        Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.
laravel/tinker                                 v2.6.1         Powerful REPL for the Laravel framework.
laravel/ui                                     v3.3.0         Laravel UI utilities and presets.
league/glide-laravel                           1.0.0          Glide adapter for Laravel
lsnepomuceno/laravel-a1-pdf-sign               0.0.12         Sign PDF files with valid x509 certificates
mantas-done/laravel-apm                        v1.0.2         Application monitoring for Laravel
mydnic/laravel-subscribers                     v1.7.2         Easily Manage Internal Newsletter Subscribers in Laravel
psalm/plugin-laravel                           v1.5.1         A Laravel plugin for Psalm
rabol/laravel-simplesubscription-stripe        1.0.8          Get up and running with subscriptions in your Laravel app in minutes instead of days
spatie/laravel-cookie-consent                  2.12.13        Make your Laravel app comply with the crazy EU cookie law
spatie/laravel-http-logger                     1.7.0          A Laravel package to log HTTP requests
spatie/laravel-package-tools                   1.9.0          Tools for creating Laravel packages
spatie/laravel-ray                             1.25.0         Easily debug Laravel apps
spatie/laravel-sitemap                         6.0.5          Create and generate sitemaps with ease
thomaswelton/laravel-gravatar                  1.3.0          Laravel 5 Gravatar helper
vimeo/psalm                                    4.9.3          A static analysis tool for finding errors in PHP applications

Additional context Add any other context about the problem here.

mr-feek commented 2 years ago

I think this is due to the php version you have configured in your psalm.xml. Please reopen if this is not the case