diff --git a/README.md b/README.md index 0fc49176..ab57cdcb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Laravel-Swoole -![php-badge](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg) +![php-badge](https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg) [![packagist-badge](https://img.shields.io/packagist/v/swooletw/laravel-swoole.svg)](https://packagist.org/packages/swooletw/laravel-swoole) [![Total Downloads](https://poser.pugx.org/swooletw/laravel-swoole/downloads)](https://packagist.org/packages/swooletw/laravel-swoole) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/swooletw/laravel-swoole/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/swooletw/laravel-swoole/?branch=master) @@ -12,7 +12,7 @@ This package provides a high performance HTTP server to speed up your Laravel/Lu | PHP | Laravel | Lumen | Swoole | |:-------:|:-------:|:-----:|:-------:| -| >=7.2 | ~5.4 | ~5.4 | >=4.0.0 | +| >=7.2 | ~5.8 | ~5.4 | >=4.0.0 | ## Features diff --git a/src/Server/Manager.php b/src/Server/Manager.php index 4258a707..634e4b81 100644 --- a/src/Server/Manager.php +++ b/src/Server/Manager.php @@ -271,7 +271,7 @@ public function onTask($server, $taskId, $srcWorkerId, $data) $this->pushMessage($server, $data['data']); // push async task to queue } elseif ($this->isAsyncTaskPayload($data)) { - (new SwooleTaskJob($this->container, $server, $data, $taskId, $srcWorkerId))->dispatch(); + (new SwooleTaskJob($this->container, $server, $data, $taskId, $srcWorkerId))->fire(); } } catch (Throwable $e) { $this->logServerError($e); diff --git a/src/Websocket/Pusher.php b/src/Websocket/Pusher.php index 7f5b0c4f..25be5854 100644 --- a/src/Websocket/Pusher.php +++ b/src/Websocket/Pusher.php @@ -45,7 +45,7 @@ class Pusher protected $event; /** - * @var string|null + * @var mixed|null */ protected $message; @@ -58,7 +58,7 @@ class Pusher * @param bool $broadcast * @param bool $assigned * @param string $event - * @param string|null $message + * @param mixed|null $message * @param \Swoole\Websocket\Server */ protected function __construct( @@ -68,7 +68,7 @@ protected function __construct( bool $broadcast, bool $assigned, string $event, - string $message = null, + $message = null, $server ) { @@ -189,9 +189,9 @@ public function getEvent(): string } /** - * @return string|null + * @return mixed|null */ - public function getMessage(): ?string + public function getMessage() { return $this->message; }