Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
valtzu committed May 9, 2024
1 parent c74a15e commit b58556a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
- uses: php-actions/phpunit@v3
with:
php_version: 8.2
version: 10
bootstrap: './vendor/autoload.php'
args: '--testdox ./tests/'
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
### Connect to WebSocket endpoint with Guzzle HTTP client
## Connect to WebSocket endpoints with Guzzle HTTP client

**NOTE:** Only `StreamHandler` supported (so no `CurlHandler`!).
**NOTE:** Only `StreamHandler` supported (so not `CurlHandler`!).

---
### Installation

```
composer install valtzu/guzzle-websocket-middleware
```

### Usage

Guzzle's `synchronous` option is used to configure the stream blocking option.

Expand Down
3 changes: 3 additions & 0 deletions tests/WebSocketStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function asynchronousReadWrite()
$server->close();
}

/**
* @return array{0: WebSocketStream, 1: WebSocketStream}
*/
private function createWebSocketPair(): array
{
$randomizer = new Randomizer(new Engine\Mt19937());
Expand Down

0 comments on commit b58556a

Please sign in to comment.