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]: Remove DI and MVC types from HistoryEndpoint #41
HistoryEndpoint requires a Phalcon\Di\DiInterface, so it cannot run in an ADR app. Make the URL logic neutral, and move the MVC dispatcher logic to an MVC listener. MVC behavior does not change.
Current coupling
The constructor requires DiInterface (src/DebugBar/History/HistoryEndpoint.php:39).
__invoke() uses Phalcon\Mvc\DispatcherInterface to select the controller (src/DebugBar/History/HistoryEndpoint.php:43).
cookiePath() reads Phalcon\Mvc\Url\UrlInterface from DI (src/DebugBar/History/HistoryEndpoint.php:57).
matches() reads the request from DI (src/DebugBar/History/HistoryEndpoint.php:85).
Proposed direction
HistoryEndpoint keeps matches(), cookiePath() and url(). It gets the request and the base URI through small resolvers.
Keep the read at call time, as it is now. The current code reads request and url when it needs them, not at boot.
Move the dispatcher selection in __invoke() to a new MVC listener. Provider::registerHistory() attaches the new listener to application:beforeHandleRequest.
Provider gives resolvers that read from DI, so the MVC result does not change.
Add an optional base URI config key with default / for hosts with no DI. AdrProvider registers no url service.
Activity
[-][NFR]: Remove DI and MVC types from HistoryEndpoint`[/-][+][NFR]: Remove DI and MVC types from HistoryEndpoint[/+]niden commentedon Nov 4, 2026
Resolved in #57