laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
166 stars 7 forks source link

[Bug]: toArray() not found after upgrading to Laravel 11 #1046

Closed ryanmortier closed 1 month ago

ryanmortier commented 1 month ago

Bug description

I think this is due to upgrading to Laravel 11 but not 100% sure. I do know that prior to upgrading, this was not warning.

App\Models\Crm\Collection extends Illuminate\Database\Eloquent\Model which has the toArray method. I'm not sure why this is showing up.

CleanShot 2024-08-01 at 13 54 13

Plugin version

v8.2.2.241

Operating system

MacOS

Steps to reproduce

No response

Relevant log output

No response

xHeaven commented 1 month ago

This needs more attention, it happens all over our codebase as well. For us, it didn't happen directly after moving to Laravel 11, but in the last couple weeks. I'm assuming some Laravel update broke things. Unfortunately, this made Laravel Idea almost unusable for Models (without explicitly type-hinting them in a variable).

image image image image

adelf commented 1 month ago

It's caused by Laravel 11.17 update. The fix will be released next week.

On Sat, 3 Aug 2024, 23:14 Márk Magyar, @.***> wrote:

This needs more attention, it happens all over our codebase as well. For us, it didn't happen directly after moving to Laravel 11, but in the last couple weeks. I'm assuming some Laravel update broke things. Unfortunately, this made Laravel Idea almost unusable for Models (without explicitly type-hinting them in a variable).

image.png (view on web) https://github.com/user-attachments/assets/4ebbe2f8-3742-4690-af8e-7069ac1ad370 image.png (view on web) https://github.com/user-attachments/assets/94327486-4097-435f-8701-2040b500cfe4 image.png (view on web) https://github.com/user-attachments/assets/b12bf4d3-301c-4952-bd68-fff6a86f91dc image.png (view on web) https://github.com/user-attachments/assets/20282616-a44b-4a9b-b800-c9f1ab352b18

— Reply to this email directly, view it on GitHub https://github.com/laravel-idea/plugin/issues/1046#issuecomment-2267126167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVQCWWZ3CPB2HJT2WIJYODZPU2ZXAVCNFSM6AAAAABL3BRC2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGEZDMMJWG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

xHeaven commented 1 month ago

It's caused by Laravel 11.17 update. The fix will be released next week.

Thanks a lot @adelf, we really appreciate it! Keep up the good work!

adelf commented 1 month ago

Fixed in the 8.2.3.