Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong return type get() method #1534

Open
rafli-sss opened this issue Mar 14, 2024 · 1 comment
Open

Wrong return type get() method #1534

rafli-sss opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@rafli-sss
Copy link

Versions:

  • ide-helper Version: 3.0.0
  • Laravel Version: 11.0.5
  • PHP Version: 8.2.16

Description:

I'm using vscode with intelephense

User::with('role')->get(); // return Illuminate\Database\Eloquent\Collection
User::orderBy('username')->get(); // return Illuminate\Support\Collection (wrong)

Steps To Reproduce:

  • php artisan ide-helper:generate
  • php artisan ide-helper:models -M
@rafli-sss rafli-sss added the bug label Mar 14, 2024
@mfn
Copy link
Collaborator

mfn commented Mar 14, 2024

I don't have L11 yet, so I can't say if that is the cause.

But on L10 with PhpStorm this works correctly; maybe it's a vscode issue (and thus unrelated to ide-helper)
image
image

In both cases it's showing Collection extends Collection, which means it's an Eloquent collection extending the base Support collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants