clue/stream-filter
Lightweight PHP library that simplifies stream filtering with a few helper functions (append, prepend, fun, remove). Easily apply built-in or custom stream filters for on-the-fly transformations like gzip, encoding conversion, and compression, with solid tests and SOLID design.
The package provides a thin abstraction over PHP's native stream filtering system, aligning well with Laravel's PHP-centric architecture. It enables straightforward stream transformations (e.g., compression, encoding) in low-level file operations where Laravel's built-in abstractions (e.g., Storage facade) don't expose raw streams. Integration is feasible due to Composer-based installation and zero dependencies, but requires accessing raw PHP streams—potentially bypassing Laravel's higher-level abstractions like Flysystem. Technical risks include PHP's inherent stream_select() incompatibility after filter addition (breaking async operations) and version-specific quirks in zlib filters. The 100% test coverage and recent PHP 8.3 support are positive signs, but the "0 dependents" metric suggests limited production adoption despite 1,709 stars. Key questions: How does this interact with Laravel's Storage component when processing files? Are there conflicts with Laravel's HTTP middleware stream handling? Does it handle PHP version inconsistencies (e.g., HHVM) safely for Laravel's supported versions?
Stack fit is strong for niche use cases like console command file processing or custom middleware where raw stream manipulation is needed, but unnecessary for typical Laravel applications using built-in storage or HTTP features. Migration path is minimal: composer require clue/stream-filter followed by using append()/prepend() in service classes where raw streams are accessible (e.g., fopen() in a
How can I help you explore Laravel packages today?