Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 915 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 liveuser 1
# Changelog
2
 
3
## 1.6.0 (2020-08-28)
4
 
5
*   Feature: Support upcoming PHP 8 release.
6
    (#246 by @clue)
7
 
8
*   Feature: Change default socket backlog size to 511.
9
    (#242 by @clue)
10
 
11
*   Fix: Fix closing connection when cancelling during TLS handshake.
12
    (#241 by @clue)
13
 
14
*   Fix: Fix blocking during possible `accept()` race condition
15
    when multiple socket servers listen on same socket address.
16
    (#244 by @clue)
17
 
18
*   Improve test suite, update PHPUnit config and add full core team to the license.
19
    (#243 by @SimonFrings and #245 by @WyriHaximus)
20
 
21
## 1.5.0 (2020-07-01)
22
 
23
*   Feature / Fix: Improve error handling and reporting for happy eyeballs and
24
    immediately try next connection when one connection attempt fails.
25
    (#230, #231, #232 and #233 by @clue)
26
 
27
    Error messages for failed connection attempts now include more details to
28
    ease debugging. Additionally, the happy eyeballs algorithm has been improved
29
    to avoid having to wait for some timers to expire which significantly
30
    improves connection setup times (in particular when IPv6 isn't available).
31
 
32
*   Improve test suite, minor code cleanup and improve code coverage to 100%.
33
    Update to PHPUnit 9 and skip legacy TLS 1.0 / TLS 1.1 tests if disabled by
34
    system. Run tests on Windows and simplify Travis CI test matrix for Mac OS X
35
    setup and skip all TLS tests on legacy HHVM.
36
    (#229, #235, #236 and #238 by @clue and #239 by @SimonFrings)
37
 
38
## 1.4.0 (2020-03-12)
39
 
40
A major new feature release, see [**release announcement**](https://clue.engineering/2020/introducing-ipv6-for-reactphp).
41
 
42
*   Feature: Add IPv6 support to `Connector` (implement "Happy Eyeballs" algorithm to support IPv6 probing).
43
    IPv6 support is turned on by default, use new `happy_eyeballs` option in `Connector` to toggle behavior.
44
    (#196, #224 and #225 by @WyriHaximus and @clue)
45
 
46
*   Feature: Default to using DNS cache (with max 256 entries) for `Connector`.
47
    (#226 by @clue)
48
 
49
*   Add `.gitattributes` to exclude dev files from exports and some minor code style fixes.
50
    (#219 by @reedy and #218 by @mmoreram)
51
 
52
*   Improve test suite to fix failing test cases when using new DNS component,
53
    significantly improve test performance by awaiting events instead of sleeping,
54
    exclude TLS 1.3 test on PHP 7.3, run tests on PHP 7.4 and simplify test matrix.
55
    (#208, #209, #210, #217 and #223 by @clue)
56
 
57
## 1.3.0 (2019-07-10)
58
 
59
*   Feature: Forward compatibility with upcoming stable DNS component.
60
    (#206 by @clue)
61
 
62
## 1.2.1 (2019-06-03)
63
 
64
*   Avoid uneeded fragmented TLS work around for PHP 7.3.3+ and 
65
    work around failing test case detecting EOF on TLS 1.3 socket streams.
66
    (#201 and #202 by @clue)
67
 
68
*   Improve TLS certificate/passphrase example.
69
    (#190 by @jsor)
70
 
71
## 1.2.0 (2019-01-07)
72
 
73
*   Feature / Fix: Improve TLS 1.3 support.
74
    (#186 by @clue)
75
 
76
    TLS 1.3 is now an official standard as of August 2018! :tada:
77
    The protocol has major improvements in the areas of security, performance, and privacy.
78
    TLS 1.3 is supported by default as of [OpenSSL 1.1.1](https://www.openssl.org/blog/blog/2018/09/11/release111/).
79
    For example, this version ships with Ubuntu 18.10 (and newer) by default, meaning that recent installations support TLS 1.3 out of the box :shipit:
80
 
81
*   Fix: Avoid possibility of missing remote address when TLS handshake fails.
82
    (#188 by @clue)
83
 
84
*   Improve performance by prefixing all global functions calls with `\` to skip the look up and resolve process and go straight to the global function.
85
    (#183 by @WyriHaximus)
86
 
87
*   Update documentation to use full class names with namespaces.
88
    (#187 by @clue)
89
 
90
*   Improve test suite to avoid some possible race conditions,
91
    test against PHP 7.3 on Travis and
92
    use dedicated `assertInstanceOf()` assertions.
93
    (#185 by @clue, #178 by @WyriHaximus and #181 by @carusogabriel)
94
 
95
## 1.1.0 (2018-10-01)
96
 
97
*   Feature: Improve error reporting for failed connection attempts and improve
98
    cancellation forwarding during DNS lookup, TCP/IP connection or TLS handshake.
99
    (#168, #169, #170, #171, #176 and #177 by @clue)
100
 
101
    All error messages now always contain a reference to the remote URI to give
102
    more details which connection actually failed and the reason for this error.
103
    Accordingly, failures during DNS lookup will now mention both the remote URI
104
    as well as the DNS error reason. TCP/IP connection issues and errors during
105
    a secure TLS handshake will both mention the remote URI as well as the
106
    underlying socket error. Similarly, lost/dropped connections during a TLS
107
    handshake will now report a lost connection instead of an empty error reason.
108
 
109
    For most common use cases this means that simply reporting the `Exception`
110
    message should give the most relevant details for any connection issues:
111
 
112
    ```php
113
    $promise = $connector->connect('tls://example.com:443');
114
    $promise->then(function (ConnectionInterface $conn) use ($loop) {
115
        // …
116
    }, function (Exception $e) {
117
        echo $e->getMessage();
118
    });
119
    ```
120
 
121
## 1.0.0 (2018-07-11)
122
 
123
*   First stable LTS release, now following [SemVer](https://semver.org/).
124
    We'd like to emphasize that this component is production ready and battle-tested.
125
    We plan to support all long-term support (LTS) releases for at least 24 months,
126
    so you have a rock-solid foundation to build on top of.
127
 
128
>   Contains no other changes, so it's actually fully compatible with the v0.8.12 release.
129
 
130
## 0.8.12 (2018-06-11)
131
 
132
*   Feature: Improve memory consumption for failed and cancelled connection attempts.
133
    (#161 by @clue)
134
 
135
*   Improve test suite to fix Travis config to test against legacy PHP 5.3 again.
136
    (#162 by @clue)
137
 
138
## 0.8.11 (2018-04-24)
139
 
140
*   Feature: Improve memory consumption for cancelled connection attempts and
141
    simplify skipping DNS lookup when connecting to IP addresses.
142
    (#159 and #160 by @clue)
143
 
144
## 0.8.10 (2018-02-28)
145
 
146
*   Feature: Update DNS dependency to support loading system default DNS
147
    nameserver config on all supported platforms
148
    (`/etc/resolv.conf` on Unix/Linux/Mac/Docker/WSL and WMIC on Windows)
149
    (#152 by @clue)
150
 
151
    This means that connecting to hosts that are managed by a local DNS server,
152
    such as a corporate DNS server or when using Docker containers, will now
153
    work as expected across all platforms with no changes required:
154
 
155
    ```php
156
    $connector = new Connector($loop);
157
    $connector->connect('intranet.example:80')->then(function ($connection) {
158
        // …
159
    });
160
    ```
161
 
162
## 0.8.9 (2018-01-18)
163
 
164
*   Feature: Support explicitly choosing TLS version to negotiate with remote side
165
    by respecting `crypto_method` context parameter for all classes.
166
    (#149 by @clue)
167
 
168
    By default, all connector and server classes support TLSv1.0+ and exclude
169
    support for legacy SSLv2/SSLv3. As of PHP 5.6+ you can also explicitly
170
    choose the TLS version you want to negotiate with the remote side:
171
 
172
    ```php
173
    // new: now supports 'crypto_method` context parameter for all classes
174
    $connector = new Connector($loop, array(
175
        'tls' => array(
176
            'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
177
        )
178
    ));
179
    ```
180
 
181
*   Minor internal clean up to unify class imports
182
    (#148 by @clue)
183
 
184
## 0.8.8 (2018-01-06)
185
 
186
*   Improve test suite by adding test group to skip integration tests relying on
187
    internet connection and fix minor documentation typo.
188
    (#146 by @clue and #145 by @cn007b)
189
 
190
## 0.8.7 (2017-12-24)
191
 
192
*   Fix: Fix closing socket resource before removing from loop
193
    (#141 by @clue)
194
 
195
    This fixes the root cause of an uncaught `Exception` that only manifested
196
    itself after the recent Stream v0.7.4 component update and only if you're
197
    using `ext-event` (`ExtEventLoop`).
198
 
199
*   Improve test suite by testing against PHP 7.2
200
    (#140 by @carusogabriel)
201
 
202
## 0.8.6 (2017-11-18)
203
 
204
*   Feature: Add Unix domain socket (UDS) support to `Server` with `unix://` URI scheme
205
    and add advanced `UnixServer` class.
206
    (#120 by @andig)
207
 
208
    ```php
209
    // new: Server now supports "unix://" scheme
210
    $server = new Server('unix:///tmp/server.sock', $loop);
211
 
212
    // new: advanced usage
213
    $server = new UnixServer('/tmp/server.sock', $loop);
214
    ```
215
 
216
*   Restructure examples to ease getting started
217
    (#136 by @clue)
218
 
219
*   Improve test suite by adding forward compatibility with PHPUnit 6 and
220
    ignore Mac OS X test failures for now until Travis tests work again
221
    (#133 by @gabriel-caruso and #134 by @clue)
222
 
223
## 0.8.5 (2017-10-23)
224
 
225
*   Fix: Work around PHP bug with Unix domain socket (UDS) paths for Mac OS X
226
    (#123 by @andig)
227
 
228
*   Fix: Fix `SecureServer` to return `null` URI if server socket is already closed
229
    (#129 by @clue)
230
 
231
*   Improve test suite by adding forward compatibility with PHPUnit v5 and
232
    forward compatibility with upcoming EventLoop releases in tests and
233
    test Mac OS X on Travis
234
    (#122 by @andig and #125, #127 and #130 by @clue)
235
 
236
*   Readme improvements
237
    (#118 by @jsor)
238
 
239
## 0.8.4 (2017-09-16)
240
 
241
*   Feature: Add `FixedUriConnector` decorator to use fixed, preconfigured URI instead
242
    (#117 by @clue)
243
 
244
    This can be useful for consumers that do not support certain URIs, such as
245
    when you want to explicitly connect to a Unix domain socket (UDS) path
246
    instead of connecting to a default address assumed by an higher-level API:
247
 
248
    ```php
249
    $connector = new FixedUriConnector(
250
        'unix:///var/run/docker.sock',
251
        new UnixConnector($loop)
252
    );
253
 
254
    // destination will be ignored, actually connects to Unix domain socket
255
    $promise = $connector->connect('localhost:80');
256
    ```
257
 
258
## 0.8.3 (2017-09-08)
259
 
260
*   Feature: Reduce memory consumption for failed connections
261
    (#113 by @valga)
262
 
263
*   Fix: Work around write chunk size for TLS streams for PHP < 7.1.14
264
    (#114 by @clue)
265
 
266
## 0.8.2 (2017-08-25)
267
 
268
*   Feature: Update DNS dependency to support hosts file on all platforms
269
    (#112 by @clue)
270
 
271
    This means that connecting to hosts such as `localhost` will now work as
272
    expected across all platforms with no changes required:
273
 
274
    ```php
275
    $connector = new Connector($loop);
276
    $connector->connect('localhost:8080')->then(function ($connection) {
277
        // …
278
    });
279
    ```
280
 
281
## 0.8.1 (2017-08-15)
282
 
283
* Feature: Forward compatibility with upcoming EventLoop v1.0 and v0.5 and
284
  target evenement 3.0 a long side 2.0 and 1.0
285
  (#104 by @clue and #111 by @WyriHaximus)
286
 
287
* Improve test suite by locking Travis distro so new defaults will not break the build and
288
  fix HHVM build for now again and ignore future HHVM build errors
289
  (#109 and #110 by @clue)
290
 
291
* Minor documentation fixes
292
  (#103 by @christiaan and #108 by @hansott)
293
 
294
## 0.8.0 (2017-05-09)
295
 
296
* Feature: New `Server` class now acts as a facade for existing server classes
297
  and renamed old `Server` to `TcpServer` for advanced usage.
298
  (#96 and #97 by @clue)
299
 
300
  The `Server` class is now the main class in this package that implements the
301
  `ServerInterface` and allows you to accept incoming streaming connections,
302
  such as plaintext TCP/IP or secure TLS connection streams.
303
 
304
  > This is not a BC break and consumer code does not have to be updated.
305
 
306
* Feature / BC break: All addresses are now URIs that include the URI scheme
307
  (#98 by @clue)
308
 
309
  ```diff
310
  - $parts = parse_url('tcp://' . $conn->getRemoteAddress());
311
  + $parts = parse_url($conn->getRemoteAddress());
312
  ```
313
 
314
* Fix: Fix `unix://` addresses for Unix domain socket (UDS) paths
315
  (#100 by @clue)
316
 
317
* Feature: Forward compatibility with Stream v1.0 and v0.7
318
  (#99 by @clue)
319
 
320
## 0.7.2 (2017-04-24)
321
 
322
* Fix: Work around latest PHP 7.0.18 and 7.1.4 no longer accepting full URIs
323
  (#94 by @clue)
324
 
325
## 0.7.1 (2017-04-10)
326
 
327
* Fix: Ignore HHVM errors when closing connection that is already closing
328
  (#91 by @clue)
329
 
330
## 0.7.0 (2017-04-10)
331
 
332
* Feature: Merge SocketClient component into this component
333
  (#87 by @clue)
334
 
335
  This means that this package now provides async, streaming plaintext TCP/IP
336
  and secure TLS socket server and client connections for ReactPHP.
337
 
338
  ```
339
  $connector = new React\Socket\Connector($loop);
340
  $connector->connect('google.com:80')->then(function (ConnectionInterface $conn) {
341
      $connection->write('…');
342
  });
343
  ```
344
 
345
  Accordingly, the `ConnectionInterface` is now used to represent both incoming
346
  server side connections as well as outgoing client side connections.
347
 
348
  If you've previously used the SocketClient component to establish outgoing
349
  client connections, upgrading should take no longer than a few minutes.
350
  All classes have been merged as-is from the latest `v0.7.0` release with no
351
  other changes, so you can simply update your code to use the updated namespace
352
  like this:
353
 
354
  ```php
355
  // old from SocketClient component and namespace
356
  $connector = new React\SocketClient\Connector($loop);
357
  $connector->connect('google.com:80')->then(function (ConnectionInterface $conn) {
358
      $connection->write('…');
359
  });
360
 
361
  // new
362
  $connector = new React\Socket\Connector($loop);
363
  $connector->connect('google.com:80')->then(function (ConnectionInterface $conn) {
364
      $connection->write('…');
365
  });
366
  ```
367
 
368
## 0.6.0 (2017-04-04)
369
 
370
* Feature: Add `LimitingServer` to limit and keep track of open connections
371
  (#86 by @clue)
372
 
373
  ```php
374
  $server = new Server(0, $loop);
375
  $server = new LimitingServer($server, 100);
376
 
377
  $server->on('connection', function (ConnectionInterface $connection) {
378
      $connection->write('hello there!' . PHP_EOL);
379
380
  });
381
  ```
382
 
383
* Feature / BC break: Add `pause()` and `resume()` methods to limit active
384
  connections
385
  (#84 by @clue)
386
 
387
  ```php
388
  $server = new Server(0, $loop);
389
  $server->pause();
390
 
391
  $loop->addTimer(1.0, function() use ($server) {
392
      $server->resume();
393
  });
394
  ```
395
 
396
## 0.5.1 (2017-03-09)
397
 
398
* Feature: Forward compatibility with Stream v0.5 and upcoming v0.6
399
  (#79 by @clue)
400
 
401
## 0.5.0 (2017-02-14)
402
 
403
* Feature / BC break: Replace `listen()` call with URIs passed to constructor
404
  and reject listening on hostnames with `InvalidArgumentException`
405
  and replace `ConnectionException` with `RuntimeException` for consistency
406
  (#61, #66 and #72 by @clue)
407
 
408
  ```php
409
  // old
410
  $server = new Server($loop);
411
  $server->listen(8080);
412
 
413
  // new
414
  $server = new Server(8080, $loop);
415
  ```
416
 
417
  Similarly, you can now pass a full listening URI to the constructor to change
418
  the listening host:
419
 
420
  ```php
421
  // old
422
  $server = new Server($loop);
423
  $server->listen(8080, '127.0.0.1');
424
 
425
  // new
426
  $server = new Server('127.0.0.1:8080', $loop);
427
  ```
428
 
429
  Trying to start listening on (DNS) host names will now throw an
430
  `InvalidArgumentException`, use IP addresses instead:
431
 
432
  ```php
433
  // old
434
  $server = new Server($loop);
435
  $server->listen(8080, 'localhost');
436
 
437
  // new
438
  $server = new Server('127.0.0.1:8080', $loop);
439
  ```
440
 
441
  If trying to listen fails (such as if port is already in use or port below
442
  1024 may require root access etc.), it will now throw a `RuntimeException`,
443
  the `ConnectionException` class has been removed:
444
 
445
  ```php
446
  // old: throws React\Socket\ConnectionException
447
  $server = new Server($loop);
448
  $server->listen(80);
449
 
450
  // new: throws RuntimeException
451
  $server = new Server(80, $loop);
452
  ```
453
 
454
* Feature / BC break: Rename `shutdown()` to `close()` for consistency throughout React
455
  (#62 by @clue)
456
 
457
  ```php
458
  // old
459
  $server->shutdown();
460
 
461
  // new
462
  $server->close();
463
  ```
464
 
465
* Feature / BC break: Replace `getPort()` with `getAddress()`
466
  (#67 by @clue)
467
 
468
  ```php
469
  // old
470
  echo $server->getPort(); // 8080
471
 
472
  // new
473
  echo $server->getAddress(); // 127.0.0.1:8080
474
  ```
475
 
476
* Feature / BC break: `getRemoteAddress()` returns full address instead of only IP
477
  (#65 by @clue)
478
 
479
  ```php
480
  // old
481
  echo $connection->getRemoteAddress(); // 192.168.0.1
482
 
483
  // new
484
  echo $connection->getRemoteAddress(); // 192.168.0.1:51743
485
  ```
486
 
487
* Feature / BC break: Add `getLocalAddress()` method
488
  (#68 by @clue)
489
 
490
  ```php
491
  echo $connection->getLocalAddress(); // 127.0.0.1:8080
492
  ```
493
 
494
* BC break: The `Server` and `SecureServer` class are now marked `final`
495
  and you can no longer `extend` them
496
  (which was never documented or recommended anyway).
497
  Public properties and event handlers are now internal only.
498
  Please use composition instead of extension.
499
  (#71, #70 and #69 by @clue)
500
 
501
## 0.4.6 (2017-01-26)
502
 
503
* Feature: Support socket context options passed to `Server`
504
  (#64 by @clue)
505
 
506
* Fix: Properly return `null` for unknown addresses
507
  (#63 by @clue)
508
 
509
* Improve documentation for `ServerInterface` and lock test suite requirements
510
  (#60 by @clue, #57 by @shaunbramley)
511
 
512
## 0.4.5 (2017-01-08)
513
 
514
* Feature: Add `SecureServer` for secure TLS connections
515
  (#55 by @clue)
516
 
517
* Add functional integration tests
518
  (#54 by @clue)
519
 
520
## 0.4.4 (2016-12-19)
521
 
522
* Feature / Fix: `ConnectionInterface` should extend `DuplexStreamInterface` + documentation
523
  (#50 by @clue)
524
 
525
* Feature / Fix: Improve test suite and switch to normal stream handler
526
  (#51 by @clue)
527
 
528
* Feature: Add examples
529
  (#49 by @clue)
530
 
531
## 0.4.3 (2016-03-01)
532
 
533
* Bug fix: Suppress errors on stream_socket_accept to prevent PHP from crashing
534
* Support for PHP7 and HHVM
535
* Support PHP 5.3 again
536
 
537
## 0.4.2 (2014-05-25)
538
 
539
* Verify stream is a valid resource in Connection
540
 
541
## 0.4.1 (2014-04-13)
542
 
543
* Bug fix: Check read buffer for data before shutdown signal and end emit (@ArtyDev)
544
* Bug fix: v0.3.4 changes merged for v0.4.1
545
 
546
## 0.3.4 (2014-03-30)
547
 
548
* Bug fix: Reset socket to non-blocking after shutting down (PHP bug)
549
 
550
## 0.4.0 (2014-02-02)
551
 
552
* BC break: Bump minimum PHP version to PHP 5.4, remove 5.3 specific hacks
553
* BC break: Update to React/Promise 2.0
554
* BC break: Update to Evenement 2.0
555
* Dependency: Autoloading and filesystem structure now PSR-4 instead of PSR-0
556
* Bump React dependencies to v0.4
557
 
558
## 0.3.3 (2013-07-08)
559
 
560
* Version bump
561
 
562
## 0.3.2 (2013-05-10)
563
 
564
* Version bump
565
 
566
## 0.3.1 (2013-04-21)
567
 
568
* Feature: Support binding to IPv6 addresses (@clue)
569
 
570
## 0.3.0 (2013-04-14)
571
 
572
* Bump React dependencies to v0.3
573
 
574
## 0.2.6 (2012-12-26)
575
 
576
* Version bump
577
 
578
## 0.2.3 (2012-11-14)
579
 
580
* Version bump
581
 
582
## 0.2.0 (2012-09-10)
583
 
584
* Bump React dependencies to v0.2
585
 
586
## 0.1.1 (2012-07-12)
587
 
588
* Version bump
589
 
590
## 0.1.0 (2012-07-11)
591
 
592
* First tagged release