[NFR]: Framework-neutral integration seam: boot and response injection without Mvc\Application
@niden đang làm issue này rồi.
Từ ngày 22/7/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
The debug bar can only be booted and injected against a Phalcon\Mvc\Application. This blocks non-MVC applications - notably ADR (Phalcon\ADR) - from using it at all. Introduce a framework-neutral integration seam so any application can boot the bar and inject it into an HTML response, keeping the current MVC path as a thin wrapper.
Current coupling
Phalcon\DebugBar\Provider::__construct(Application $app, array $config)requires aPhalcon\Mvc\Application, andboot()reaches into it through$app->getDI()and$app->getEventsManager().- Response injection is attached to the MVC
application:beforeSendResponseevent insideProvider::boot()(theResponseListener).
Why it does not work for ADR
- The ADR container is
Phalcon\Container\Container(implementsCollection, notPhalcon\Di\DiInterface), sogetDI()and the?DiInterfaceparameters do not fit. - The ADR stack never fires
application:beforeSendResponse. The response is available atEvent::APPLICATION_AFTER_HANDLE(Phalcon\ADR\Application) and is written out by the ADR emitter. - Data collection (the collectors' event vocabulary) is a separate concern tracked in ticket 2; this ticket covers only the boot and injection seam.
Proposed direction
- Extract a neutral core that takes only what it needs: an events manager (or none), a
Phalcon\Http\RequestInterface(or none), and an optional config source - noPhalcon\Mvc\Application, noPhalcon\Di\DiInterface. - Provide a neutral entry point to inject the rendered bar into a given
Phalcon\Http\ResponseInterface, callable at each framework's own response-emission point:- MVC: the existing
application:beforeSendResponselistener. - ADR: a listener on
APPLICATION_AFTER_HANDLE, or an emitter hook.
- MVC: the existing
- Keep
Phalcon\DebugBar\Provider(Application $app, ...)as a thin convenience wrapper over the neutral core, so MVC behavior is unchanged.
Acceptance
- The bar boots and injects into an HTML
ResponseInterfacein an application that has neither aPhalcon\Mvc\Applicationnor aPhalcon\Di\DiInterface. - The existing MVC integration (as used by
phalcon/vokuro) is unchanged.
- Ngôn ngữ chính
- PHP
- Star
- 6
- Fork
- 3
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của phalcon/debugbar
-
[NFR]: History Panel enhancementsCó thể đã có người làm @niden đã nhận 18 ngày trước. Đang mởenhancement
-
[NFR]: Collector source adapters for ADR data sources (DB / View / Route)Có thể làm lại được @niden đã nhận 83 ngày trước và không có pull request nào đang mở. Đang mởenhancement
-
[NFR]: Decouple collectors from framework event names (bridge + canonical signals)Có thể làm lại được @niden đã nhận 83 ngày trước và không có pull request nào đang mở. Đang mởenhancement
-
[NFR]: Debug bar support for ADR / non-MVC appsCó thể làm lại được @niden đã nhận 83 ngày trước và không có pull request nào đang mở. Đang mởenhancement
-
[NFR]: Services panel for DebugBarCó thể làm lại được @niden đã nhận 93 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Tất cả issue của phalcon/debugbar
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
matomo-org/device-detector#8405 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 4 ngày