--level used: 0I try to analyse my project and get error:
Call to protected static method get() of class Illuminate\Filesystem\FilesystemManager
...
use Illuminate\Support\Facades\Storage;
...
$myFile = Storage::get($path); // <- at this line
It appears this would be an issue with phpstan not correctly parsing @mixin, but instead using @see for links. The Storage facade has @see \Illuminate\Filesystem\FilesystemManager, and that manager then has @mixin \Illuminate\Contracts\Filesystem\Filesystem, which it appears phpstan fails to interpret correctly (as @mixin is not officially a support docblock annotation). Using @see in the Laravel framework might be the proper fix here
Storage::drive()->get() and it clears the error.
Since the Storage facade now has get and other methods defined using PHPDoc annotations, this particular issue no longer exists. Since there is also a similar issue for Facades that use a manager pattern, I suppose this issue can be closed. What do you think @canvural ?
@Daanra Yeah looks those annotations are in both 6.x and 7.x so we can close this issue :+1:
Most helpful comment
Storage::drive()->get() and it clears the error.