Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stream Laravel Package

hoa/stream

Hoa\Stream provides an object-oriented abstraction layer for PHP streams, wrapping resources with consistent APIs for reading, writing, filtering, and context handling. It simplifies working with files, sockets, and custom stream wrappers while preserving native stream behavior.

View on GitHub
Deep Wiki
Context7

The Hoa\Stream library.

Frequently asked questions about Stream
Is hoa/stream compatible with Laravel 10 and Laravel 11?
hoa/stream's last tagged release was 2017-02-21 and its PHP constraint predates the 8.x line that Laravel 10 and 11 require, so Composer will likely refuse to resolve it in a modern Laravel app. Even if you force the install, the Hoa stack (hoa/consistency, hoa/exception, hoa/protocol) can emit deprecation noise or hard failures on PHP 8.1 and above. Test on your exact production PHP version before writing any integration code.
How do I install hoa/stream with Composer?
Run composer require hoa/stream. The package is PSR-4 autoloaded, BSD-3-Clause licensed, and ships no Laravel service provider or facade, so nothing is auto-discovered. A successful Composer resolve is not the same as a working install, so check the resolved PHP constraint and the transitive Hoa packages and pin the exact version you get.
Does hoa/stream have a Laravel service provider or facade?
No. hoa/stream provides no service provider, facade, config file, or publishable assets, so any Laravel wiring is yours to write. The safer pattern is to wrap it behind an internal interface such as your own StreamReader and StreamWriter contracts bound in a service provider, so call sites never reference Hoa\Stream classes directly. That keeps a one-file swap open when you replace it later.
Is hoa/stream still maintained?
No. The GitHub repository is archived, the last tagged release is from February 2017, and there is no upstream issue triage, PHP compatibility work, or security patching. The reported zero dependents is a signal about ecosystem confidence rather than proof of safety. If you adopt it, you own the fork and the patch budget.
What can hoa/stream do that Laravel Flysystem or native PHP streams cannot?
In practice, very little. Flysystem v3 disks, Guzzle, and native stream functions with stream_wrapper_register cover the same read, write, filter, and wrapper ground with first-party support. hoa/stream's value is its consistent object-oriented API over streams, its interface contracts (In, Out, Path, Bufferable, Lockable, Touchable), and its filter chaining. That matters when hoa/file, hoa/socket, or hoa/compiler are already in your dependency tree, not as a standalone addition.
How do I create a custom stream wrapper with hoa/stream?
You extend the library's stream wrapper base class, implement the read and write behavior, and register the protocol through hoa/protocol. Be aware that this registration is global and can collide with wrappers already registered by Laravel, Flysystem, or Phar. For a single wrapper in a Laravel app, PHP's built-in stream_wrapper_register is usually sufficient without an archived abstraction on top.
Can I use hoa/stream for socket or network streams?
Yes, hoa/socket builds on hoa/stream and the library gives you a uniform API over network streams. It is a synchronous abstraction, however, and provides no event loop, so it is a poor fit for concurrent network I/O. For concurrency use ReactPHP or async Guzzle handlers; for a simple blocking read, native PHP streams plus a small adapter are lower risk.
How does hoa/stream handle errors and exceptions in Laravel?
Carefully. Hoa\Exception does not extend \Exception in the way Laravel's exception handler expects, so uncaught Hoa exceptions will not be rendered or reported cleanly and can surface as opaque 500s. Translate them at your adapter boundary into your own domain exceptions or standard Laravel exceptions. That boundary is also the right place to log stream context before rethrowing.
What are good alternatives to hoa/stream in a Laravel application?
For files and object storage, use Laravel's Storage facade backed by Flysystem v3. For HTTP use Laravel's HTTP client or Guzzle, and for custom protocols use PHP's native stream_wrapper_register and stream_filter_register or a maintained package like clue/stream-filter. Only reach for hoa/stream when an existing Hoa dependency already requires it and you are treating it as a contained compatibility shim.
How do I test code that depends on hoa/stream?
Because protocol registration is global state, isolate any test that registers a wrapper and clean up afterward so it does not leak into later tests. Run the suite with E_ALL so deprecations from the Hoa stack surface in CI rather than in production logs. If you have wrapped the library behind your own interface, most tests can target that interface with fakes and never touch Hoa\Stream directly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console