laravel-ide-helper
laravel-ide-helper copied to clipboard
Error in `getValidAliases()` when running with swoole installed
Since the package cannot work with swoole, It would make sense in the Generator.php method getValidAliases()
Not only to skip predis, but also swoole.
if ($facade == 'SwooleTW\Http\Server\Facades\Server' && $name == 'Server' && !class_exists('Swoole\Http\Server')) {
continue;
}
I understand this pattern is also used this way, e.g. https://github.com/barryvdh/laravel-ide-helper/blob/9f5670b7e94869b116dc8c3d100f95ca63527536/src/Generator.php#L151-L153
Isn't there a way to more generically solve this?
Can you show a complete stacktrace? Maybe it's smarter to just add a try/catch in the foreach and emit a brief console message (instead of aborting) everything, WDYT?