[NFR]: Add a direct push API to collectors
维护者通常 1 天内回复
@niden 已经在做这个了。
开始于 2026年11月3日。
评估
这个 Issue 还没有评估数据。
描述
Summary
Most collectors can receive data only through their event listeners. A host that has other data sources, or no events manager, cannot feed them. Add public methods to these collectors. Behavior does not change.
Current state
ExceptionsCollector::addThrowable()already exists and does not change.DatabaseCollector,ViewCollector,RouteCollectorandCacheCollectorwrite their data only insidesubscribe()closures.
Proposed direction
Follow the addThrowable() naming. The existing listeners call the new methods.
DatabaseCollector: a start method and a finish method that takes the SQL and the bindings. The collector measures the time.ViewCollector: a start method that takes the path and a finish method. The pending stack stays, so nested partials are timed correctly.CacheCollector: a method that takes the operation and the key.RouteCollector: a method that takes the panel values, or a callable that returns them. The collector calls the callable at collect time. This keeps the MVC read at collect time, because the MVC router is not fully resolved whenrouter:matchedRoutefires. After #15, the collector needs noPhalcon\Mvcimport.
Acceptance
- Each collector gets data through its new method, with no events manager.
- The existing collector tests pass with the same expected results.
- Tests pass with full coverage.
phpcsandphpstanpass.
Part of
#13
- 主要语言
- PHP
- 星标
- 6
- 派生
- 3
- 平均合并
- 5 小时 50 分钟
- 30 天内合并 PR
- 18
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
FinanceFlash/unvibecode#577 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
Eyevinn/php-runner#24 ·
-
Administration: required plugin configuration field stays invalid after restoring its saved value未关闭needs-triage Platform(Default)
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 87/100
octobercms/october#6153 ·
-
good first issue priority:low type:docs
难度 1/5 1-3 小时 新手友好度 95/100
crazy-goat/rabbit-stream#969 ·
维护者通常 1 天内回复