From d4a6819e9e0bdbad1916d4ece535e697a2782600 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sat, 2 Mar 2024 21:39:04 +0100 Subject: [PATCH 1/2] Add route path for easier use. --- src/Panel/RequestPanel.php | 1 + templates/element/request_panel.php | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Panel/RequestPanel.php b/src/Panel/RequestPanel.php index 6c5f0890..d4b6ad36 100644 --- a/src/Panel/RequestPanel.php +++ b/src/Panel/RequestPanel.php @@ -49,6 +49,7 @@ public function shutdown(EventInterface $event): void } $this->_data = [ + 'params' => $request->getAttribute('params'), 'attributes' => $attributes, 'query' => Debugger::exportVarAsNodes($request->getQueryParams(), $maxDepth), 'data' => Debugger::exportVarAsNodes($request->getData(), $maxDepth), diff --git a/templates/element/request_panel.php b/templates/element/request_panel.php index 6f113d15..81a51d58 100644 --- a/templates/element/request_panel.php +++ b/templates/element/request_panel.php @@ -24,6 +24,7 @@ * @var \Cake\Error\Debug\NodeInterface $query * @var \Cake\Error\Debug\NodeInterface $cookie * @var string $matchedRoute + * @var array $params */ use Cake\Error\Debugger; @@ -41,6 +42,23 @@

+

Route path

+ +
+ +
+

+ [Plugin].[Prefix]/[Controller]::[action] +

+

Attributes

Date: Sat, 2 Mar 2024 21:49:44 +0100 Subject: [PATCH 2/2] Fix test --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 860e0ca6..1f605002 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -43,6 +43,7 @@ define('LOGS', TMP); require_once CORE_PATH . 'config/bootstrap.php'; +require_once CAKE . 'functions.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8');