barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.25k stars 1.17k forks source link

ReflectionException in Alias::getMacroFunction #1544

Open chu121su12 opened 6 months ago

chu121su12 commented 6 months ago

Versions:

Description:

Exception throw in generate cli:

> post-update-cmd: @php artisan ide-helper:generate

   ReflectionException 

  Function () does not exist

  at vendor/barryvdh/laravel-ide-helper/src/Alias.php:414

https://github.com/barryvdh/laravel-ide-helper/blob/6338abb2d7cbefc58c1ac4adc5f6824b5d0c7324/src/Alias.php#L414

Steps To Reproduce:

The error have been there since v2.13.0, laravel v10.20.0. I can't seem to find the code that causes this yet. Manually adding try-catch in the parent block helps https://github.com/barryvdh/laravel-ide-helper/blob/6338abb2d7cbefc58c1ac4adc5f6824b5d0c7324/src/Alias.php#L382-L391

muarachmann commented 5 months ago

Same here