hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaravelS 3.7.37 Optimized the call of schedule:run command Issue

DevilSerj opened this issue · comments

commented
  1. Your software version (Screenshot of your startup)

+---------------------------+-----------+
| Component | Version |
+---------------------------+-----------+
| PHP | 8.1.20RC1 |
| Swoole | 5.1.1 |
| LaravelS | 3.7.37 |
| Laravel Framework [local] | 9.30.0 |
+---------------------------+-----------+

  1. Detail description about this issue(error/log)
    Target class [swoole] does not exist in application's command schedule.

Target class [swoole] does not exist. {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target class [swoole] does not exist. at /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:877)

  1. Some reproducible code blocks and steps
    protected function schedule(Schedule $schedule)
    {
    // $schedule->command('inspire')->hourly();
    $schedule->call(function () {
    OnlineGame::pushOnlineAll();
    })->everyMinute();
    }

这个在之前版本应该也是不行的