arnapou / stream
Library - Simple input and output interfaces.
    v1.5.0
    2025-10-25 13:22 UTC
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.52
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/php-code-coverage: ^12.0
- phpunit/phpunit: ^12.0
- psr/http-message: ^2.0
Suggests
- psr/http-message: Necessary to use StreamInterface adapters.
README
This library allow you to wrap streams with Input or Output basic interfaces.
Installation
composer require arnapou/stream
packagist 👉️ arnapou/stream
Input
The stream you "read".
namespace Arnapou\Stream\Input;
interface Input
{
    public function open(): void;
    public function read(): string;
    public function close(): void;
}
Output
The stream you "write".
namespace Arnapou\Stream\Output;
interface Output
{
    public function write(string $data): void;
}
Php versions
| Date | Ref | 8.5 | 8.4 | 8.3 | 
|---|---|---|---|---|
| 25/10/2025 | 1.5.x, main | × | × | × | 
| 25/11/2024 | 1.4.x | × | × | |
| 23/01/2024 | 1.0 - 1.3 | × |