1
0
Fork 0
mirror of https://github.com/shufflingpixels/php-io.git synced 2026-08-15 19:58:14 +02:00
php-io/tests/Unit
Henrik Hautakoski 07ec405512 Adopt Go-style minimal interfaces for streams
Replace PSR-7 StreamInterface with a set of small, composable interfaces
(ReaderInterface, WriterInterface, SeekerInterface and their
combinations).
BinaryReader now depends only on ReaderInterface, BinaryWriter on
WriterInterface, making both easy to satisfy with any byte source or
sink.

Buffer and Resource are simplified — no capability flags, no
detach/close
lifecycle, no PSR-7 metadata methods. LimitedResource is replaced by
LimitedReader, a lightweight reader that enforces a byte count limit.
BinaryReader::read() is renamed to readExact() for clarity.

Tests updated throughout to match the new APIs.
2026-06-27 09:01:12 +02:00
..
BinaryReaderTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00
BinaryWriterTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00
BufferTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00
ExceptionTest.php Initial commit 2026-04-22 07:15:24 +02:00
FileModeTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00
FileTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00
ResourceTest.php Adopt Go-style minimal interfaces for streams 2026-06-27 09:01:12 +02:00