laravel-ide-helper
laravel-ide-helper copied to clipboard
laravel-debugbar package breaks Collection constructor parameter awareness (_ide_helper.php)
Versions:
- ide-helper Version: 2.12.3
- Laravel Version: 9.25.1
- PHP Version: 8.1.8
- PhpStorm 2022.2.1
Description:
Generated _ide_helper.php code for Collection, when using laravel-debugbar package, breaks constructor awareness.
The following gets generated, and as a result, PhpStorm no longer sees that the new Collection(...) constructor accepts a parameter. If I remove this whole section from _ide_helper.php, PhpStorm 'sees' the constructor again.
/**
*
*
* @template TKey of array-key
* @template TValue
* @implements \ArrayAccess<TKey, TValue>
* @implements \Illuminate\Support\Enumerable<TKey, TValue>
*/
class Collection {
/**
*
*
* @see \Barryvdh\Debugbar\ServiceProvider::register()
* @static
*/
public static function debug()
{
return \Illuminate\Support\Collection::debug();
}
}
Steps To Reproduce:
Generate _ide_helper.php with the laravel-debugbar composer package installed.