You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-42Lines changed: 0 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,15 +40,13 @@ mess with most of the low-level details.
40
40
*[submit()](#submit)
41
41
*[send()](#send)
42
42
*[withOptions()](#withoptions)
43
-
*[withSender()](#withsender)
44
43
*[withBase()](#withbase)
45
44
*[withoutBase()](#withoutbase)
46
45
*[ResponseInterface](#responseinterface)
47
46
*[RequestInterface](#requestinterface)
48
47
*[UriInterface](#uriinterface)
49
48
*[ResponseException](#responseexception)
50
49
*[Advanced](#advanced)
51
-
*[Sender](#sender)
52
50
*[SOCKS proxy](#socks-proxy)
53
51
*[Options](#options)
54
52
*[Install](#install)
@@ -106,11 +104,6 @@ $connector = new \React\Socket\Connector($loop, array(
106
104
$browser = new Browser($loop, $connector);
107
105
```
108
106
109
-
Legacy notice: This project previously used different APIs that are now
110
-
deprecated, but continue to work unchanged. This legacy API will be removed in
111
-
a future version, so it's highly recommended to upgrade to the above API.
112
-
See also [`Sender`](#sender).
113
-
114
107
#### Methods
115
108
116
109
The `Browser` offers several methods that resemble the HTTP protocol methods:
@@ -363,22 +356,6 @@ actually returns a *new* [`Browser`](#browser) instance with the [options](#opti
363
356
364
357
See [options](#options) for more details.
365
358
366
-
#### withSender()
367
-
368
-
> [deprecated] The `Sender` is deprecated and will likely be removed in a
369
-
future version.
370
-
371
-
The `withSender(Sender $sender)` method can be used to change the [`Sender`](#sender) instance to use:
372
-
373
-
```php
374
-
$newBrowser = $browser->withSender($sender);
375
-
```
376
-
377
-
Notice that the [`Browser`](#browser) is an immutable object, i.e. the `withSender()` method
378
-
actually returns a *new*[`Browser`](#browser) instance with the given [`Sender`](#sender) applied.
379
-
380
-
See [`Sender`](#sender) for more details.
381
-
382
359
#### withBase()
383
360
384
361
The `withBase($baseUri)` method can be used to change the base URI used to
@@ -457,25 +434,6 @@ The `getResponse()` method can be used to access its underlying [`ResponseIntefa
457
434
458
435
## Advanced
459
436
460
-
### Sender
461
-
462
-
> [deprecated] The `Sender` is deprecated and will likely be removed in a
463
-
future version.
464
-
465
-
The `Sender` is responsible for passing the [`RequestInterface`](#requestinterface) objects to
466
-
the underlying [`HttpClient`](https://github.com/reactphp/http-client) library
467
-
and keeps track of its transmission and converts its reponses back to [`ResponseInterface`](#responseinterface) objects.
468
-
469
-
It also registers everything with the main [`EventLoop`](https://github.com/reactphp/event-loop#usage)
470
-
and the default [`Connector`](https://github.com/reactphp/socket-client) and [DNS `Resolver`](https://github.com/reactphp/dns).
471
-
472
-
See also [`Browser::withSender()`](#withsender) for changing the `Sender` instance during runtime.
473
-
474
-
Legacy notice: The `Sender` class mostly exists in order to abstract changes
475
-
on the underlying components away from this package. As such, it offers a number
476
-
of legacy APIs that are now deprecated and no longer in active use. These APIs
477
-
continue to work unchanged, but will be removed in a future version.
478
-
479
437
### SOCKS proxy
480
438
481
439
You can also establish your outgoing connections through a SOCKS proxy server
Copy file name to clipboardExpand all lines: src/Io/Sender.php
+16-22Lines changed: 16 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,20 @@
16
16
useReact\Stream\ReadableStreamInterface;
17
17
18
18
/**
19
-
* @deprecated as of v1.4.0, see `Browser`
19
+
* [Internal] Sends requests and receives responses
20
+
*
21
+
* The `Sender` is responsible for passing the [`RequestInterface`](#requestinterface) objects to
22
+
* the underlying [`HttpClient`](https://github.com/reactphp/http-client) library
23
+
* and keeps track of its transmission and converts its reponses back to [`ResponseInterface`](#responseinterface) objects.
24
+
*
25
+
* It also registers everything with the main [`EventLoop`](https://github.com/reactphp/event-loop#usage)
26
+
* and the default [`Connector`](https://github.com/reactphp/socket-client) and [DNS `Resolver`](https://github.com/reactphp/dns).
27
+
*
28
+
* The `Sender` class mostly exists in order to abstract changes on the underlying
29
+
* components away from this package in order to provide backwards and forwards
30
+
* compatibility.
31
+
*
32
+
* @internal You SHOULD NOT rely on this API, it is subject to change without prior notice!
20
33
* @see Browser
21
34
*/
22
35
class Sender
@@ -44,32 +57,13 @@ public static function createFromLoop(LoopInterface $loop, ConnectorInterface $c
44
57
returnnewself(newHttpClient($loop, $connector));
45
58
}
46
59
47
-
/**
48
-
* [deprecated] create sender attached to the given event loop and DNS resolver
49
-
*
50
-
* @param LoopInterface $loop
51
-
* @param \React\Dns\Resolver\Resolver|string $dns DNS resolver instance or IP address
0 commit comments