2.0.0
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 InputStreamhas been renamed toReadableStreamand now extendsAmp\Closable. Theread()method now supports an optionalCancellationparameter.OutputStreamhas been renamed toWritableStreamand now extendsAmp\Closable.WritableStream::end()no longer accepts an optional data chunk as parameter.IteratorStreamhas been repalced byReadableIterableStream, which accepts anyiterableofstrings (particularly useful withGeneratororPipeline).ResourceInputStreamhas been renamed toReadableResourceStream. Theread()method has an additional, optional$limitparameter to specify the maximum number of bytes to read.ResourceOutputStreamhas been renamed toWritableResourceStream.InMemoryStreamhas been renamed toReadableBuffer.OutputBufferhas been renamed toWritableBuffer.Payloadnow accepts astringin addition to aReadableStreamand isfinalnow.Payload::buffer()may only be called once.- Added a
$limitparam toAmp\ByteStream\buffer()andPayload::buffer()to set a limit on the maximum bytes that can be buffered. - Added
BufferedReader, a helper class for reading fromReadableStreamusing fixed lengths or delimiters found within the stream (#94) - Added
Pipe. - Added
StreamChannelimplementing theChannelinterface fromamphp/sync. - The zlib streams have been moved into the
Compressionsub-namespace and renamed toCompressingWritableStreamandDecompressingReadableStream. - Add
CompressingReadableStream(#99) - Add
DecompressingWritableStream(#99) - The base64 streams have been renamed to reflect the new interface names.
InputStreamChainhas been renamed toReadableStreamChain.- Renamed the
$optionsparam ofparseLineDelimitedJsonto$flagsto match thejson_decodefunction.