Amphp Byte Stream Versions Save

A non-blocking stream abstraction for PHP based on Amp.

v1.8.2

1 month ago

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/byte-stream/compare/v1.8.1...v1.8.2

v2.1.1

3 months ago

What's Changed

  • Fixed cancellation not being forwarded to split() in splitLines().

Full Changelog: https://github.com/amphp/byte-stream/compare/v2.1.0...v2.1.1

v2.1.0

5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/byte-stream/compare/v2.0.2...v2.1.0

v2.0.2

8 months ago
  • Fixed throwing an Error when invoking getStdin(), getStdout(), and getStderr() if the corresponding STDIO stream had been previously closed. Instead, an already closed stream instance is returned.

v2.0.1

1 year ago
  • Fixed ReadableResourceStream calling Suspension::resume() when destroyed, which could throw an exception when suspending from {main} and an uncaught exception was thrown from the event loop.

v2.0.0

1 year ago

Initial stable release compatible with AMPHP v3 and fibers.

There are a number of renaming and compatibility breaks with 1.x versions:

  • Added interface ResourceStream
  • InputStream has been renamed to ReadableStream and now extends Amp\Closable. The read() method now supports an optional Cancellation parameter.
  • OutputStream has been renamed to WritableStream and now extends Amp\Closable. WritableStream::end() no longer accepts an optional data chunk as parameter.
  • IteratorStream has been repalced by ReadableIterableStream, 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 $limit 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 and is final now. Payload::buffer() may only be called once.
  • Added a $limit param to Amp\ByteStream\buffer() and Payload::buffer() to set a limit on the maximum bytes that can be buffered.
  • Added BufferedReader, a helper class for reading from ReadableStream using fixed lengths or delimiters found within the stream (#94)
  • Added Pipe.
  • Added StreamChannel implementing the Channel interface from amphp/sync.
  • The zlib streams have been moved into the Compression sub-namespace and renamed to CompressingWritableStream and DecompressingReadableStream.
  • Add CompressingReadableStream (https://github.com/amphp/byte-stream/pull/99)
  • Add DecompressingWritableStream (https://github.com/amphp/byte-stream/pull/99)
  • The base64 streams have been renamed to reflect the new interface names.
  • InputStreamChain has been renamed to ReadableStreamChain.
  • Renamed the $options param of parseLineDelimitedJson to $flags to match the json_decode function.

v2.0.0-beta.14

1 year ago

v2.0.0-beta.13

1 year ago

Improved performance of continuous reads in ReadableResourceStream

v2.0.0-beta.12

1 year ago
  • Add compatibility with Revolt v1.x

v2.0.0-beta.11

1 year ago