hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.
MIT License
3.84k stars 473 forks source link

Does LaravelS support Laravel 6.x? 是否支持Laravel 6.x? #208

Closed zaoy closed 4 years ago

zaoy commented 4 years ago
  1. Tell us your software version How to know it?

    # PHP
    php -v
    # Swoole
    php --ri swoole
    # Laravel
    grep 'laravel/framework' composer.json
    # Lumen
    grep 'laravel/lumen-framework' composer.json
    Software Version
    PHP TODO
    Swoole TODO
    Laravel/Lumen 6.x
  2. Detail description about this issue(error/log)

    TODO

  3. Give us a reproducible code block and steps

    //TODO: Your code
hhxsv5 commented 4 years ago

Laravel 6 relies onignition, currently there will be compatibility issues Action Facade\Ignition\Http\Controllers\ShareReportController not defined., fundamentally, the reason is that Swoole runs incli mode, and ignition does [special processing](https://github.com/facade/ignition/blob/1.13.0/src/IgnitionServiceProvider.php # L135)) according to the running mode. Configurable environment variable APP_RUNNING_IN_CONSOLE to solve temporarily.

APP_RUNNING_IN_CONSOLE = false

Fixed Application: isRunningInConsole being cached

Laravel 6依赖了ignition,目前会出现兼容性问题Action Facade\Ignition\Http\Controllers\ShareReportController not defined.,根本原因是Swoole运行在cli模式下,而ignition根据运行模式做了特殊处理。 可配置环境变量APP_RUNNING_IN_CONSOLE来临时解决。

APP_RUNNING_IN_CONSOLE=false

Fixed Application: isRunningInConsole being cached

juslintek commented 4 years ago

Do not use APP_RUNNING_IN_CONSOLE=false if you use Horizon for job management and monitoring. It will break it and it will not be able to spawn the supervisor process.