Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[NFR]: Framework-neutral integration seam: boot and response injection without Mvc\Application

オープン
#14 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@niden がすでに取り組んでいます。

2026年7月22日 から。

評価

この issue はまだ評価されていません。

説明

enhancement
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 a Phalcon\Mvc\Application, and boot() reaches into it through $app->getDI() and $app->getEventsManager().
  • Response injection is attached to the MVC application:beforeSendResponse event inside Provider::boot() (the ResponseListener).
Why it does not work for ADR
  • The ADR container is Phalcon\Container\Container (implements Collection, not Phalcon\Di\DiInterface), so getDI() and the ?DiInterface parameters do not fit.
  • The ADR stack never fires application:beforeSendResponse. The response is available at Event::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 - no Phalcon\Mvc\Application, no Phalcon\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:beforeSendResponse listener.
    • ADR: a listener on APPLICATION_AFTER_HANDLE, or an emitter hook.
  • 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 ResponseInterface in an application that has neither a Phalcon\Mvc\Application nor a Phalcon\Di\DiInterface.
  • The existing MVC integration (as used by phalcon/vokuro) is unchanged.
主要言語
PHP
スター
6
フォーク
3
平均マージ
1日 17時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

phalcon/debugbar のほかの issue

phalcon/debugbar の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。