You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[NFR]: Extract a neutral injection method from ResponseListener #39
The injection logic can run only through an event call. A host with no events manager cannot inject the bar. Move the logic to a public method that takes only a response.
Current state
ResponseListener::__invoke(EventInterface $event, mixed $source, mixed $response) holds all the logic (src/DebugBar/ResponseListener.php:55).
The logic does not use $event or $source.
Injector is already neutral and does not change.
Proposed direction
Add a public method that takes a Phalcon\Http\ResponseInterface, and move the logic to it.
__invoke() keeps the instanceof check and calls the new method.
Acceptance
A test calls the new method with no event, and the bar is injected.
The existing ResponseListenerTest tests pass with the same expected results.
Tests pass with full coverage. phpcs and phpstan pass.
changed the title [-][NFR]: Extract a neutral injection method from ResponseListener`[/-][+][NFR]: Extract a neutral injection method from ResponseListener[/+]on Nov 3, 2026
Activity
[-][NFR]: Extract a neutral injection method from ResponseListener`[/-][+][NFR]: Extract a neutral injection method from ResponseListener[/+]niden commentedon Nov 3, 2026
Resolved in #49