diff --git a/composer.json b/composer.json index c3d2f0f67..52be37557 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "php": ">=7.2", "nette/component-model": "^3.0", "nette/http": "^3.0.2", - "nette/routing": "~3.0.0", + "nette/routing": "~3.0.2", "nette/utils": "^3.2.1" }, "suggest": { diff --git a/src/Bridges/ApplicationTracy/RoutingPanel.php b/src/Bridges/ApplicationTracy/RoutingPanel.php index aaa69952b..0b068387c 100644 --- a/src/Bridges/ApplicationTracy/RoutingPanel.php +++ b/src/Bridges/ApplicationTracy/RoutingPanel.php @@ -89,7 +89,8 @@ private function analyse( Routing\Router $router, string $module = '', bool $parentMatches = true, - int $level = -1 + int $level = -1, + int $flag = 0 ): void { if ($router instanceof Routing\RouteList) { try { @@ -98,8 +99,9 @@ private function analyse( } $next = count($this->routers); $parentModule = $module . ($router instanceof Nette\Application\Routers\RouteList ? $router->getModule() : ''); - foreach ($router->getRouters() as $subRouter) { - $this->analyse($subRouter, $parentModule, $parentMatches, $level + 1); + $flags = $router->getFlags(); + foreach ($router->getRouters() as $i => $subRouter) { + $this->analyse($subRouter, $parentModule, $parentMatches, $level + 1, $flags[$i]); } if ($info = $this->routers[$next] ?? null) { @@ -111,7 +113,7 @@ private function analyse( return; } - $matched = 'no'; + $matched = $flag & Routing\RouteList::ONE_WAY ? 'oneway' : 'no'; $params = $e = null; try { $params = $parentMatches diff --git a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml index 2a256fa08..9370193aa 100644 --- a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml +++ b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml @@ -81,7 +81,8 @@ use Tracy\Helpers; - '✓', 'may' => '≈', 'no' => '', 'error' => '❌'][$router->matched] ?> + '✓', 'may' => '≈', 'no' => '', 'oneway' => '⛔', 'error' => '❌'][$router->matched] ?> mask) ? str_replace(['/', '-'], ['/', '-'], Helpers::escapeHtml($router->mask)) : str_replace('\\', '\\', Helpers::escapeHtml($router->class)) ?>