zbateson/stream-decorators
Lightweight PHP stream decorators for composing and filtering streams. Wrap any resource to add behaviors like buffering, limiting, logging, or on-the-fly transforms while keeping a standard stream interface. Useful for email parsing, I/O pipelines, and testing.
CharsetStream for UTF-8 ↔ ISO-8859-1 conversions). Aligns with Laravel’s PSR-7 adoption (e.g., Symfony Mailer, Guzzle HTTP) for consistent stream handling.CharsetStream for UTF-16 ↔ UTF-8).LimitStream + Base64Stream) to throttle and encode uploads in real time.DecoratedCachingStream to replay responses).Adopt only if:
Stream component).Look elsewhere if:
HttpFoundation or Guzzle’s built-in streams, which already handle many use cases (e.g., StreamWrapper).fopen resources) where decorator integration would require significant refactoring.ffmpeg-php).For Executives: "This package cuts development time for data pipeline features by 30–50% by providing ready-to-use stream utilities—no need to hire I/O specialists or maintain custom code. For example, processing email attachments with Base64/Quoted-Printable encoding now takes one decorator instead of weeks of debugging. The BSD license ensures zero legal risk, and the low-maintenance footprint reduces long-term costs."
For Engineering: *"Think of this as Laravel’s missing stream toolkit. Need to:
Base64Stream.CharsetStream.LimitStream + BufferStream.DecoratedCachingStream.It’s PSR-7 compliant, so it plays nicely with Guzzle, Symfony Mailer, and Laravel’s HTTP stack. Start with one decorator, and compose as needed—no framework lock-in."*
For QA/DevOps: "The package’s modular design makes it easy to test edge cases (e.g., malformed Base64, charset mismatches) in isolation. Since it’s pure PHP, it’s portable across Laravel versions and won’t introduce binary compatibility risks."
How can I help you explore Laravel packages today?