Skip to content

T62 reduce coupling - #63

Merged
niden merged 6 commits into
masterfrom
T62-reduce-coupling
Nov 5, 2026
Merged

niden merged 6 commits into
masterfrom
T62-reduce-coupling

Conversation

@niden

@niden niden commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

  • Core::createHistory() creates the request history from the history config, and History\HistoryRecorder holds its workflow.
  • Core::getBar() returns the bar that boot() created.
  • RequestContext holds the client address and the AJAX and HTTPS flags for each decision, and Injector::isHtml() tells if a response is an HTML page.
  • Security\Redactor::redactUri() applies the redaction rule to the query of a URI.
  • A shared fixture, tests/support/assets/DebugBar/panel-contract.json, makes the PHP and JavaScript tests use the same payload.
  • Breaking: Logger\Adapter and Logger\ExceptionAdapter have no constructor argument. They read the active bar each time the logger writes, so you can create them before the bar boots. Replace new Adapter(Debug::getBar()) with new Adapter().
  • Breaking: LoggerCollector takes a Security\Redactor, and it redacts the log context.
  • Core::boot() and ResponseListener take one ?History\HistoryRecorder in place of the history, endpoint and cookie arguments.
  • History\HistoryEndpoint::CONTROLLER_NAMESPACE is now Mvc\HistoryListener::CONTROLLER_NAMESPACE.
  • The providers validate the history config after they check for the events manager, and for the container or the router. An invalid history.path does not throw when history cannot run.
  • A collector no longer sends widget.icon and AbstractCollector has no $icon property, because the browser client never read them. indicator.icon does not change.
  • DebugBarTypes holds the wire contract and the config shapes, and it lists the panel names, so static analysis rejects an unknown panel name.
  • The debug page in ADR applications uses Injector::isHtml() and no longer depends on the injection rules of the bar.
  • The request panel and request history no longer show or store a query value under a masked key in the URI.
  • The documentation states the effect of a long-lived worker on request history.

Thanks

@niden niden self-assigned this Nov 5, 2026
@niden niden added the enhancement New feature or request label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Code Metrics Report

master (2ff8451) #63 (0024414) +/-
Coverage 100.0% 100.0% 0.0%
Test Execution Time 4s 3s -1s
Details
  |                     | master (2ff8451) | #63 (0024414) | +/-  |
  |---------------------|------------------|---------------|------|
  | Coverage            |           100.0% |        100.0% | 0.0% |
  |   Files             |               81 |            83 |   +2 |
  |   Lines             |             2000 |          2002 |   +2 |
+ |   Covered           |             2000 |          2002 |   +2 |
+ | Test Execution Time |               4s |            3s |  -1s |

Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)

Details
Files Coverage +/- Patch Coverage Status
src/DebugBar/ADR/DebugPageListener.php 100.0% 0.0% 100.0% modified
src/DebugBar/ADR/Provider.php 100.0% 0.0% 100.0% modified
src/DebugBar/Collector/AbstractCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/CacheCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/ConfigCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/DatabaseCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/ExceptionsCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/HistoryCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/LoggerCollector.php 100.0% 0.0% 100.0% modified
src/DebugBar/Collector/MemoryCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/MessagesCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/RequestCollector.php 100.0% 0.0% 100.0% modified
src/DebugBar/Collector/RouteCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/SessionCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/TimeCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/VersionCollector.php 100.0% 0.0% - modified
src/DebugBar/Collector/ViewCollector.php 100.0% 0.0% - modified
src/DebugBar/Contracts/Renderable.php 0.0% 0.0% - modified
src/DebugBar/Core.php 100.0% 0.0% 100.0% modified
src/DebugBar/DebugBarTypes.php 0.0% 0.0% - modified
src/DebugBar/History/HistoryEndpoint.php 100.0% 0.0% - modified
src/DebugBar/History/HistoryHandler.php 100.0% 0.0% 100.0% modified
src/DebugBar/History/HistoryOptions.php 100.0% 0.0% - modified
src/DebugBar/History/HistoryRecorder.php 100.0% +100.0% 100.0% added
src/DebugBar/Injector.php 100.0% 0.0% 100.0% modified
src/DebugBar/Logger/Adapter.php 100.0% 0.0% 100.0% modified
src/DebugBar/Logger/ExceptionAdapter.php 100.0% 0.0% 100.0% modified
src/DebugBar/Mvc/HistoryListener.php 100.0% 0.0% 100.0% modified
src/DebugBar/Provider.php 100.0% 0.0% 100.0% modified
src/DebugBar/RequestContext.php 100.0% +100.0% 100.0% added
src/DebugBar/ResponseListener.php 100.0% 0.0% 100.0% modified
src/DebugBar/Security/Redactor.php 100.0% 0.0% 100.0% modified

Reported by octocov

@niden
niden merged commit d7f8475 into master Nov 5, 2026
24 checks passed
@niden
niden deleted the T62-reduce-coupling branch November 5, 2026 15:22
@niden niden mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant