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

ReflectionException in Alias::getMacroFunction #1544

Open
chu121su12 opened this issue May 14, 2024 · 1 comment
Open

ReflectionException in Alias::getMacroFunction #1544

chu121su12 opened this issue May 14, 2024 · 1 comment
Labels

Comments

@chu121su12
Copy link

Versions:

  • ide-helper Version: v3.0.0
  • Laravel Version: v11.7.0
  • PHP Version: 8.3.6

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

return new \ReflectionFunction($macro_func);

Steps To Reproduce:

  • run php artisan ide-helper:generate

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

// Add macros
$this->methods[] = new Macro(
$this->getMacroFunction($macro_func),
$this->alias,
$reflection,
$macro_name,
$this->interfaces,
$this->classAliases
);
$this->usedMethods[] = $macro_name;

@chu121su12 chu121su12 added the bug label May 14, 2024
@muarachmann
Copy link

Same here

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