Skip to content

Commit 709a4ce

Browse files
committed
Forward compatibility with upcoming Socket v1.0 and v0.8
1 parent f5eaedb commit 709a4ce

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"require": {
77
"php": ">=5.4.0",
88
"guzzlehttp/psr7": "^1.0",
9-
"react/socket": "^0.7",
9+
"react/socket": "^1.0 || ^0.8 || ^0.7",
1010
"react/event-loop": "0.4.*",
1111
"react/stream": "0.4.*",
1212
"react/promise": "~2.2",

src/Request.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use GuzzleHttp\Psr7 as gPsr;
77
use React\Socket\ConnectorInterface;
88
use React\Stream\WritableStreamInterface;
9+
use React\Socket\ConnectionInterface;
910

1011
/**
1112
* @event headers-written
@@ -60,7 +61,7 @@ public function writeHead()
6061
$this
6162
->connect()
6263
->done(
63-
function ($stream) use ($requestData, &$streamRef, &$stateRef) {
64+
function (ConnectionInterface $stream) use ($requestData, &$streamRef, &$stateRef) {
6465
$streamRef = $stream;
6566

6667
$stream->on('drain', array($this, 'handleDrain'));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy