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
InputStream
has been renamed toReadableStream
and now extendsAmp\Closable
. Theread()
method now supports an optionalCancellation
parameter.OutputStream
has been renamed toWritableStream
and now extendsAmp\Closable
.WritableStream::end()
no longer accepts an optional data chunk as parameter.IteratorStream
has been repalced byReadableIterableStream
, which accepts anyiterable
ofstring
s (particularly useful withGenerator
orPipeline
).ResourceInputStream
has been renamed toReadableResourceStream
. Theread()
method has an additional, optional$limit
parameter to specify the maximum number of bytes to read.ResourceOutputStream
has been renamed toWritableResourceStream
.InMemoryStream
has been renamed toReadableBuffer
.OutputBuffer
has been renamed toWritableBuffer
.Payload
now accepts astring
in addition to aReadableStream
and isfinal
now.Payload::buffer()
may only be called once.- Added a
$limit
param toAmp\ByteStream\buffer()
andPayload::buffer()
to set a limit on the maximum bytes that can be buffered. - Added
BufferedReader
, a helper class for reading fromReadableStream
using fixed lengths or delimiters found within the stream (#94) - Added
Pipe
. - Added
StreamChannel
implementing theChannel
interface fromamphp/sync
. - The zlib streams have been moved into the
Compression
sub-namespace and renamed toCompressingWritableStream
andDecompressingReadableStream
. - Add
CompressingReadableStream
(#99) - Add
DecompressingWritableStream
(#99) - The base64 streams have been renamed to reflect the new interface names.
InputStreamChain
has been renamed toReadableStreamChain
.- Renamed the
$options
param ofparseLineDelimitedJson
to$flags
to match thejson_decode
function.