Tests fixes (#908)
This commit is contained in:
parent
6beed7d8ff
commit
491d164118
|
|
@ -17,11 +17,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
laravel:
|
||||
- 6.*
|
||||
- 7.*
|
||||
|
|
@ -32,15 +34,27 @@ jobs:
|
|||
include:
|
||||
- laravel: '6.*'
|
||||
testbench: '4.*'
|
||||
phpunit: '^8.5.8|^9.3.3'
|
||||
- laravel: '7.*'
|
||||
testbench: '5.*'
|
||||
phpunit: '^8.5.8|^9.3.3'
|
||||
- laravel: '8.*'
|
||||
testbench: '6.*'
|
||||
phpunit: '^9.3.3'
|
||||
exclude:
|
||||
- php: '8.0'
|
||||
laravel: 6.*
|
||||
prefer: 'prefer-lowest'
|
||||
- php: '8.0'
|
||||
laravel: 7.*
|
||||
prefer: 'prefer-lowest'
|
||||
- php: '8.1'
|
||||
laravel: 6.*
|
||||
- php: '8.1'
|
||||
laravel: 7.*
|
||||
- php: '8.1'
|
||||
laravel: 8.*
|
||||
prefer: 'prefer-lowest'
|
||||
|
||||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} --${{ matrix.prefer }}
|
||||
|
||||
|
|
@ -67,7 +81,7 @@ jobs:
|
|||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench-browser-kit:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench-browser-kit:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
|
||||
composer update --${{ matrix.prefer }} --prefer-dist --no-interaction --no-suggest
|
||||
|
||||
- name: Run tests for Local
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
],
|
||||
"require": {
|
||||
"cboden/ratchet": "^0.4.1",
|
||||
"clue/redis-react": "^2.3",
|
||||
"clue/redis-react": "^2.5",
|
||||
"evenement/evenement": "^2.0|^3.0",
|
||||
"facade/ignition-contracts": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.5|^2.0",
|
||||
"guzzlehttp/psr7": "^1.7|^2.0",
|
||||
"illuminate/broadcasting": "^6.3|^7.0|^8.0",
|
||||
"illuminate/console": "^6.3|^7.0|^8.0",
|
||||
"illuminate/http": "^6.3|^7.0|^8.0",
|
||||
|
|
@ -41,15 +41,15 @@
|
|||
"illuminate/routing": "^6.3|^7.0|^8.0",
|
||||
"illuminate/support": "^6.3|^7.0|^8.0",
|
||||
"pusher/pusher-php-server": "^3.0|^4.0|^5.0|^6.0|^7.0",
|
||||
"react/promise": "^2.0",
|
||||
"symfony/http-kernel": "^4.0|^5.0",
|
||||
"react/promise": "^2.8",
|
||||
"symfony/http-kernel": "^4.4|^5.4",
|
||||
"symfony/psr-http-message-bridge": "^1.1|^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"clue/block-react": "^1.4",
|
||||
"laravel/legacy-factories": "^1.1",
|
||||
"orchestra/testbench-browser-kit": "^4.0|^5.0|^6.0",
|
||||
"phpunit/phpunit": "^8.0|^9.0"
|
||||
"phpunit/phpunit": "^8.5.8|^9.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcntl": "Running the server needs pcntl to listen to command signals and soft-shutdown.",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use BeyondCode\LaravelWebSockets\Apps\App;
|
|||
use BeyondCode\LaravelWebSockets\Contracts\ChannelManager;
|
||||
use BeyondCode\LaravelWebSockets\Server\QueryParameters;
|
||||
use Exception;
|
||||
use GuzzleHttp\Psr7\Message;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Psr7\ServerRequest;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
|
@ -139,7 +140,7 @@ abstract class Controller implements HttpServerInterface
|
|||
'error' => $exception->getMessage(),
|
||||
]));
|
||||
|
||||
tap($connection)->send(\GuzzleHttp\Psr7\str($response))->close();
|
||||
tap($connection)->send(Message::toString($response))->close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
|||
|
||||
use BeyondCode\LaravelWebSockets\Concerns\PushesToPusher;
|
||||
use BeyondCode\LaravelWebSockets\Rules\AppId;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Throwable;
|
||||
|
||||
class SendMessage
|
||||
{
|
||||
|
|
@ -42,7 +42,7 @@ class SendMessage
|
|||
$request->event,
|
||||
$decodedData ?: []
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
} catch (Throwable $e) {
|
||||
return response()->json([
|
||||
'ok' => false,
|
||||
'exception' => $e->getMessage(),
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace BeyondCode\LaravelWebSockets\Server;
|
||||
|
||||
use Exception;
|
||||
use GuzzleHttp\Psr7\Message;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Ratchet\ConnectionInterface;
|
||||
|
|
@ -25,7 +26,7 @@ class HealthHandler implements HttpServerInterface
|
|||
json_encode(['ok' => true])
|
||||
);
|
||||
|
||||
tap($connection)->send(\GuzzleHttp\Psr7\str($response))->close();
|
||||
tap($connection)->send(Message::toString($response))->close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue