Closed dmason30 closed 7 months ago
I also get errors in PHPstorm due to this issue, I guess.
Use real-time facades: https://laravel.com/docs/5.8/facades#real-time-facades Just add Facades\ to the path.
'Arr' => Facades\Illuminate\Support\Arr::class,
'Str' => Facades\Illuminate\Support\Str::class,
@pverhaert There are some functions that don't work properly with your solution. e.g.
class Arr
{
public static function forget(&$array, $keys)
{
...
}
}
because __callStatic
method in Illuminate\Support\Facades\Facade
cannot pass reference parameters.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
I guess they should only be added if they're a facade. In the case of these classes I would only expect a root class to extend the Support class.
I guess they should only be added if they're a facade. In the case of these classes I would only expect a root class to extend the Support class.
Not quite sure if I understand what you mean, but they should be examined. They are macroable and the helper is able to pick those macros up.
With https://github.com/barryvdh/laravel-ide-helper/releases/tag/v2.8.1 there was recent improvements regarding macros
Add support for macros of all macroable classes
But don't know how this works together with such classes which aren't "real" Facades 🤷♀️
But don't know how this works together with such classes which aren't "real" Facades 🤷♀️
Sorry if I wasn't clear, what I meant is that macros are indeed already working with Str and Arr (well, probably, I only have macros for Str). I just wanted to point that out so the helper wouldn't be updated to simply completely ignore them as there is value in examining and adding ide helpers for them despite not actually being Facades.
ide-helper version: 2.6.2
In Laravel 5.8.3 aliases were added for the
Arr
andStr
classes by default:https://github.com/laravel/laravel/pull/4951
They are not added as a
Facade
though justalias
of aclass
, I assume this is the issue:In
PHPStorm
I am not getting any autcomplete functions for these classes:Do I need to create my own
Facade
for these classes?ide-helper.php The
ide-helper
outputs this in theide-helper.php
file:Temporary solution I get autocomplete if I remove this section from the
ide-helper.php
but this file is regenerated often.