ref: 415624673042e8093e1d8ff161baa20473bc4d48 psr7-string-stream/src/StringStream.php -rw-r--r-- 6.8 KiB
Fix write() to not prepend

This commit brings write() more inline with how fwrite() works, given
that's ultimately what StreamInterface is trying to provide; a wrapper
around streams and the various file functions

It's still possible to append by writing beyond the capacity of the
Fix write() to not assume appending is correct

This commit rewrites the `write()' function to check if it's at EOF
before appending. Now the function is able to prepend if at SOF, and
can also overwrite data in the middle of a stream.
Initial commit