barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.17k stars 1.16k forks source link

Empty Collections class in _ide_helper.php causes bad intellisense #1585

Open amcsi opened 3 weeks ago

amcsi commented 3 weeks ago

Versions:

Question:

IDE-Helper generates classes like Illuminate\Database\Eloquent\Collection that is like the built-in Eloquent Collection, except it has none of the methods including the constructor, so it makes type-hinting bad: it thinks there is no constructor thus marks what I pass to the constructor as gray (not needed), also it things the ->merge() method does not exist. I'm sure I must be doing wrong. Please help.

The generated bits in _ide_helper.php image image

The bad intellisense. image

config/ide-helper.php