diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bf471a..bf50baa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,6 +56,14 @@ jobs: - name: "PHP CS Fixer (dry-run)" run: composer cs-fixer + - name: "Setup Node.js" + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '24.8.0' + + - name: "JavaScript tests" + run: node --test tests/JavaScript/debugbar.test.js + tests: name: "Tests (PHP ${{ matrix.php }}, Phalcon ${{ matrix.variant }})" permissions: diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c5b2d..f553981 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,18 @@ All notable changes to `phalcon/debugbar` are documented here. The format is bas ### Added +- A memory collector reports current and peak PHP request usage. Time and Memory + are enabled by default and open from compact indicators on the right instead of + duplicate tabs; the indicators remain available when History is disabled. - Optional, extensible collector summaries rendered as headline metrics above a panel. The database collector uses them to report total queries, duplicate runs (executions after the first), and accumulated SQL time, and marks repeated statements with their execution count. +- Optional browser-isolated request history with filesystem retention and an + internal `GET/DELETE /_debugbar/open` endpoint. A dedicated HttpOnly cookie keeps + History independent from the application's PHP session; clients that do not + return it create no storage. The endpoint resolves the final base URI at request + time, leaves application routes and shared responses untouched, and is excluded + from debug-bar collection and injection. Stored payloads are versioned, bounded, + expired automatically, and listed through metadata sidecars. History requires an + explicit absolute writable path and is disabled by default. ## [0.4.0](https://github.com/phalcon/debugbar/releases/tag/v0.4.0) (2026-07-14) @@ -34,7 +45,7 @@ All notable changes to `phalcon/debugbar` are documented here. The format is bas ### Added -- A `logger` collector and `Phalcon\DebugBar\Logger\Adapter`. Attach the adapter to the application logger and every item logged through `Phalcon\Logger` is captured in the bar's "Logs" tab, separate from the manual `messages` collector. Each entry keeps the log level, message, and PSR-3 context; the context renders as a collapsible, pretty-printed JSON detail. Forwarding runs through the new `DebugBar::addLog()` and no-ops when the collector is disabled. [#6](https://github.com/phalcon/debugbar/issues/6) +- A `logger` collector and `Phalcon\DebugBar\Logger\Adapter`. Attach the adapter to the application logger and every item logged through `Phalcon\Logger` is captured in the `Logs` panel, separate from the manual `messages` collector. Each entry keeps the log level, message, and PSR-3 context; the context renders as a collapsible, pretty-printed JSON detail. Forwarding runs through the new `DebugBar::addLog()` and no-ops when the collector is disabled. [#6](https://github.com/phalcon/debugbar/issues/6) ### Fixed diff --git a/docs/index.md b/docs/index.md index 9905402..f200090 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,7 +35,7 @@ The remainder of this document covers the debug bar. ## Registering the Debug Bar -The bar is booted by `Phalcon\DebugBar\Provider`. It takes the MVC application and an optional configuration array. Its only coupling to the application is the application's events manager, so the application must have one set before the bar boots. +The bar is booted by `Phalcon\DebugBar\Provider`. It takes the MVC application and an optional configuration array. The application must have an events manager set before the bar boots. The provider does not add or modify application routes. ```php ` | `[]` (any client) | Client IP allowlist. Empty allows any address. | | `access.callback` | `(Closure(): bool)\|null` | `null` | Extra gate. When present, it must also return `true`. | | `assets.nonce` | `string\|null` | `null` | CSP nonce stamped on the injected `