Repository navigation
feat: read-only extension points for debugging tools - #442
Merged
Merged
Conversation
This was referenced Oct 8, 2026
BindingResolved is dispatched for each binding resolved (source, field, attribute, post, time, whether the request cache answered), only when something listens. AssetManager::containers() lists every asset container by name.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five read-only extension points that
pollora/debugbar(and any other debugging tool) needs to show what Pollora did during a request. None of them mentions a debugger.Changes
FrontendControllerrecords aTemplateResolution(template file, conditional tag, Blade view, index fallback, outcome) in theAnsweringTemplatesingleton. Requests answered byRoute::wp()or a Laravel route leave it empty, which is how a reader tells them apart. Works withoutWP_DEBUG, unlikeTemplateMarker.WordPressBootingevent — dispatched byBootstrapright beforewp-settings.phploads, after the database constants. The last moment to act before WordPress builds its globals (e.g. swap in a profilingwpdb, which WordPress keeps when it already exists). Listen from a provider'sregister().DiscoveryCacheManager::scans()lists, per location, whether the structures came from this process's copy (memory), the persistent cache (cache) or a real scan (disk), with time and count. The context's hit/miss counters only knew about the in-process copy, so a cold and a warm persistent cache both read as a miss.BindingResolvedevent — dispatched byBindingResolverfor each binding resolved: source, field, attribute, post, time spent, whether this request's cache answered, whether a value came back. Only dispatched when a listener exists.AssetManager::containers()— every asset container by name (theme, plugins, modules), so a tool can list where a page's assets come from.Tests
FrontendControllerTest: condition + view recorded; index-fallback 404 recorded as not found; empty by default.WordPressBootingEventTest: event dispatched before the settings file (run as WP-CLI so no WordPress install is needed).DiscoveryCacheManagerSlowScanTest: disk vs memory; disk vs warm persistent cache.BindingResolverTest: resolutions announced, cache hits flagged, empty values flagged.AssetManagerContainersTest: containers listed by name.Rector, Pint and PHPStan clean; type coverage 99.2 %. Locally 11
QueryExceptionfailures inHook/AsyncandModuleActivationexist on the base branch too (12 there), unrelated to this change.Part of the Debugbar integration spec (changes 1, 2, 4, 6 and 7;
pollora/debugbarlaunches with v13.35.3).