mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
The MetaCommand's custom autoloader throws a ReflectionException for any class not found during meta generation. However, this breaks libraries that use class_exists() to check for optional dependencies before loading them (e.g. Doctrine ORM checking for StaticReflectionService removed in doctrine/persistence v4). This fix checks the call stack (up to 3 frames) for class_exists(), interface_exists(), trait_exists(), or enum_exists() calls and returns gracefully instead of throwing, allowing the existence check to return false as expected. Fixes #1750