Skip to content

Releases: amphp/byte-stream

2.0.0 Beta 10

25 Jun 17:28
v2.0.0-beta.10
0c2b2ab
Compare
Choose a tag to compare
2.0.0 Beta 10 Pre-release
Pre-release
  • Reverted ReadableIterableStream transforming exceptions from the given iterable into StreamException, as this change made the class less flexible for implementing specialized streams throwing domain-specific exceptions.

2.0.0 Beta 9

16 Jun 22:54
v2.0.0-beta.9
8dd48cc
Compare
Choose a tag to compare
2.0.0 Beta 9 Pre-release
Pre-release
  • Fixed cancelling a read in ReadableIterableStream causing all subsequent reads to fail
  • If the iterable in ReadableIterableStream throws an exception that is not an instance of StreamException, a StreamException is thrown with the prior thrown exception set as the previous exception
  • Renamed the $options param of parseLineDelimitedJson to $flags to match the json_decode function.

2.0.0 Beta 8

03 Apr 17:11
v2.0.0-beta.8
00adeed
Compare
Choose a tag to compare
2.0.0 Beta 8 Pre-release
Pre-release
  • Removed Closable interface since it has been moved to amphp/amp
  • ReadableStream and WritableStream now extend Amp\Closable

2.0.0 Beta 7

26 Mar 15:22
v2.0.0-beta.7
5dfd811
Compare
Choose a tag to compare
2.0.0 Beta 7 Pre-release
Pre-release
  • Renamed ClosableStream to Closable and added an onClose method to register callbacks that are invoked when the stream closes (#97)
  • Improved exception backtraces for write failures in WritableResourceStream (#96)

2.0.0 Beta 6

05 Mar 15:48
v2.0.0-beta.6
Compare
Choose a tag to compare
2.0.0 Beta 6 Pre-release
Pre-release
  • Fixed double close error in WritableBuffer
  • Drop PHP 8.0 support

2.0.0 Beta 5

07 Feb 05:05
a63cf29
Compare
Choose a tag to compare
2.0.0 Beta 5 Pre-release
Pre-release
  • Added StreamChannel implementing the Channel interface from amphp/sync.

2.0.0 Beta 4

02 Feb 15:27
0f34e7f
Compare
Choose a tag to compare
2.0.0 Beta 4 Pre-release
Pre-release
  • Compatibility with revolt/event-loop v0.2.x
  • Added BufferedReader, a helper class for reading from ReadableStream using fixed lengths or delimiters found within the stream (#94)
  • Renamed IterableStream to ReadableIterableStream
  • Renamed EmitterStream to WritableIterableStream and removed the constructor Emitter param. Use WritableIterableStream::getIterator() to retrieve the iterable for reading
  • Fixed error handling writing to AsyncWriter after the stream has closed (#93)

2.0.0 Beta 3

22 Dec 22:30
v2.0.0-beta.3
Compare
Choose a tag to compare
2.0.0 Beta 3 Pre-release
Pre-release
  • Fixed @throws annotations in WritableStream

2.0.0 Beta 2

17 Dec 21:47
Compare
Choose a tag to compare
2.0.0 Beta 2 Pre-release
Pre-release
  • Removed the optional $bytes parameter from WritableStream::end().
  • ReadableResourceStream::read() now performs a read immediately on the stream to avoid leaving data in PHP's internal stream buffers.
  • Renamed $length param on ReadableResourceStream::read() to $limit to better reflect its purpose.
  • Added a $limit param to Amp\ByteStream\buffer() and Payload::buffer() to set a limit on the maximum bytes that can be buffered.

2.0.0 Beta 1

11 Dec 01:14
2c3f338
Compare
Choose a tag to compare
2.0.0 Beta 1 Pre-release
Pre-release

Initial beta release compatible with amphp v3.

There are a number of renaming and compatibility breaks with v1.x.

  • Added interfaces ClosableStream and ResourceStream
  • InputStream has been renamed to ReadableStream and now extends ClosableStream. The read() method now supports an optional Cancellation parameter.
  • OutputStream has been renamed to WritableStream and now extends ClosableStream.
  • IteratorStream has been repalced by IterableStream, which accepts any iterable of strings (particularly useful with Generator or Pipeline).
  • ResourceInputStream has been renamed to ReadableResourceStream. The read() method has an additional, optional $length parameter to specify the maximum number of bytes to read.
  • ResourceOutputStream has been renamed to WritableResourceStream.
  • InMemoryStream has been renamed to ReadableBuffer.
  • OutputBuffer has been renamed to WritableBuffer.
  • Payload now accepts a string in addition to a ReadableStream. Payload::buffer() may only be called once.
  • Added Pipe and EmitterStream classes.
  • The zlib streams have been moved into the Compression sub-namespace and renamed to CompressingWritableStream and DecompressingReadableStream.
  • The base-64 streams have been renamed to reflect the new interface names.
  • InputStreamChain has been renamed to ReadableStreamChain.