F
Filament16mo ago
RickDB

Upgrade L9 to L10

Hi, I upgraded our filament project from laravel 9 to laravel 10, however PHPStan is going crazy now.
Line Filament/Resources/SoerOrderResource/Pages/CreateSoerOrder.php
------ -------------------------------------------------------------------
26 Access to an undefined property App\Models\User::$email.
27 Call to an undefined static method App\Models\Soer\Order::find().
------ -------------------------------------------------------------------

------ -----------------------------------------------------------------------
Line Filament/Resources/StockCountPresetResource.php
------ -----------------------------------------------------------------------
47 Call to an undefined static method App\Models\ItemSync\Item::pluck().
53 Call to an undefined static method App\Models\ItemSync\Item::pluck().
61 Call to an undefined static method App\Models\ItemSync\Item::pluck().
Line Filament/Resources/SoerOrderResource/Pages/CreateSoerOrder.php
------ -------------------------------------------------------------------
26 Access to an undefined property App\Models\User::$email.
27 Call to an undefined static method App\Models\Soer\Order::find().
------ -------------------------------------------------------------------

------ -----------------------------------------------------------------------
Line Filament/Resources/StockCountPresetResource.php
------ -----------------------------------------------------------------------
47 Call to an undefined static method App\Models\ItemSync\Item::pluck().
53 Call to an undefined static method App\Models\ItemSync\Item::pluck().
61 Call to an undefined static method App\Models\ItemSync\Item::pluck().
Every resource has these kind of errors Does anyone have an idea?
4 Replies
toeknee
toeknee16mo ago
That's not really a filament issue, that's more PHP/Laravel. All the issues are related to Models not Filament. If it works, then the IDE/phpStan is not picking up the stubs to know the calls exist
Dan Harrin
Dan Harrin16mo ago
yeah its not a filament issue the solution is to use ::query() to initialse a query i think otherwise it uses a magic static method call which phpstan doesn’t understand
RickDB
RickDB16mo ago
Hmm, it did understand before in L9 lol Anyways, will try this out, thanks Dan! 🙂
Dan Harrin
Dan Harrin16mo ago
larastan probably got upgraded abilities