jdwx/stream
Composer 安装命令:
composer require jdwx/stream
包简介
A simple PHP module for handling arbitrarily large data streams
README 文档
README
A simple PHP module for handling arbitrarily large data streams.
Installation
You can require it with Composer:
composer require jdwx/stream
Or download the source from GitHub: https://github.com/jdwx/stream-php.git
Requirements
This module requires PHP 8.3 or later. It has no other dependencies.
Usage
This module is designed to allow returning arbitrarily large amounts of data:
- without requiring the data to be held all in memory at the same time, and
- without requiring all the data to be available before the initial data is returned.
This is useful, for example, for extremely large web pages or for web pages that take a long time to load to allow returning progressive updates. In smaller projects, it can also make it easier to combine smaller elements into a single output and can make it easier to post-process output or insert things at various points.
Specifically, if you have a stream like (using array notation):
[ 'Foo', $bar, 'Baz' ]
Where $bar is a Stringable object, the stream maintains $bar as an object reference. So if you then go to append $qux to the stream and determine that $bar needs to be modified, you can do that up until it has been consumed.
A smattering of tools for mocking and consuming such streams are also included, mostly for testing purposes.
Stability
This module has complete test coverage. It is relatively new but has been widely used internally with good results and is believed stable.
The interface should be relatively stable at this point.
History
This module was refactored out of a prerelease version of jdwx/web to separate concerns in June 2025.
jdwx/stream 适用场景与选型建议
jdwx/stream 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.51k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jdwx/stream 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jdwx/stream 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-07