Skip to content

2.0.0 Beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@trowski trowski released this 11 Dec 01:14
2c3f338

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.