laravel-ide-helper icon indicating copy to clipboard operation
laravel-ide-helper copied to clipboard

Incorrect namespaces in PHPDoc comments for global types

Open Miloslav opened this issue 2 years ago • 3 comments

Versions:

  • ide-helper Version: 2.12.3
  • Laravel Version: 9.38.0
  • PHP Version: 8.1.12

Description:

In generated _ide_helper.php specific methods have incorrect type in the @param PHPdoc tag. Instead of primitive types like iterable, ?string, array, \Closure, callable there is a fully qualified type, but a namespace prefix is incorrect.

e.g. image iterable exists, but \Illuminate\Cache\iterable does not. Same for \Psr\SimpleCache\iterable<string>

Please let me know if you need more information.

Thank you!

Miloslav avatar Jan 09 '23 14:01 Miloslav

Also saw this error on Eloquent Conditionable class: https://github.com/laravel/framework/blob/10.x/src/Illuminate/Conditionable/Traits/Conditionable.php#L21

image

d8vjork avatar Feb 08 '23 17:02 d8vjork

ide-helper Version: 2.13.0 Laravel Version: 8.83.27 PHP Version: 7.4.33

also occurs.

snmatsui avatar Jul 18 '23 05:07 snmatsui

#1442 is a similar bug but for template params instead of global types.

czuniga9 avatar Jan 19 '24 17:01 czuniga9