Skip to content

Commit 6ccc4bd

Browse files
committed
Prepare v0.5.0 release
1 parent aea7752 commit 6ccc4bd

2 files changed

Lines changed: 75 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,74 @@
11
# Changelog
22

3+
## 0.5.0 (2017-03-08)
4+
5+
* Feature / BC break: Consistent `end` event semantics (EOF)
6+
(#70 by @clue)
7+
8+
The `end` event will now only be emitted for a `successful` end, not it the
9+
stream closes due to an unrecoverable `error` event or if it is `close()`d
10+
explicitly.
11+
If you want to detect when the stream closes (terminates), use the `close`
12+
event instead.
13+
14+
* BC break: Remove custom (undocumented) `full-drain` event from `Buffer`
15+
(#63 and #68 by @clue)
16+
17+
> The `full-drain` event was undocumented and mostly used internally.
18+
Relying on this event has attracted some low-quality code in the past, so
19+
we've removed this from the public API in order to work out a better
20+
solution instead.
21+
If you want to detect when the buffer finishes flushing data to the stream,
22+
you may want to look into its `end()` method or the `close` event instead.
23+
24+
* Feature / BC break: Consistent event semantics and documentation,
25+
explicitly state *when* events will be emitted and *which* arguments they
26+
receive.
27+
(#73 and #69 by @clue)
28+
29+
The documentation now explicitly defines each event and its arguments.
30+
Custom events and event arguments are still supported.
31+
Most notably, all defined events only receive inherently required event
32+
arguments and no longer transmit the instance they are emitted on for
33+
consistency and performance reasons.
34+
35+
```php
36+
// old (inconsistent and not supported by all implementations)
37+
$stream->on('data', function ($data, $stream) {
38+
// process $data
39+
});
40+
41+
// new (consistent throughout the whole ecosystem)
42+
$stream->on('data', function ($data) use ($stream) {
43+
// process $data
44+
});
45+
```
46+
47+
> This mostly adds documentation (and thus some stricter, consistent
48+
definitions) for the existing behavior, it does NOT define any major
49+
changes otherwise.
50+
Most existing code should be compatible with these changes, unless
51+
it relied on some undocumented/unintended semantics.
52+
53+
* Feature / BC break: Consistent method semantics and documentation
54+
(#72 by @clue)
55+
56+
> This mostly adds documentation (and thus some stricter, consistent
57+
definitions) for the existing behavior, it does NOT define any major
58+
changes otherwise.
59+
Most existing code should be compatible with these changes, unless
60+
it relied on some undocumented/unintended semantics.
61+
62+
* Feature: Consistent `pipe()` semantics for closed and closing streams
63+
(#71 from @clue)
64+
65+
The source stream will now always be `pause()`d when the destination stream
66+
closes. Also, properly stop piping if the source stream closes and remove
67+
all event forwarding.
68+
69+
* Improve test suite by adding PHPUnit to `require-dev` and improving coverage.
70+
(#74 and #75 by @clue, #66 by @nawarian)
71+
372
## 0.4.6 (2017-01-25)
473

574
* Feature: The `Buffer` can now be injected into the `Stream` (or be used standalone)

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ descriptor based implementation with an in-memory write buffer.
3636
* [Usage](#usage)
3737
* [Install](#install)
3838
* [Tests](#tests)
39+
* [License](#license)
3940

4041
## API
4142

@@ -711,7 +712,7 @@ The recommended way to install this library is [through Composer](http://getcomp
711712
This will install the latest supported version:
712713

713714
```bash
714-
$ composer require react/stream:^0.4.6
715+
$ composer require react/stream:^0.5
715716
```
716717

717718
More details about version upgrades can be found in the [CHANGELOG](CHANGELOG.md).
@@ -730,3 +731,7 @@ To run the test suite, go to the project root and run:
730731
```bash
731732
$ php vendor/bin/phpunit
732733
```
734+
735+
## License
736+
737+
MIT, see [LICENSE file](LICENSE).

0 commit comments

Comments
 (0)