Skip to content

Commit 333d435

Browse files
authored
fix regex to ignore wdt routes (#21)
1 parent 1fd6b2b commit 333d435

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
/composer.lock
33
/tools/*/vendor
44
/var
5+
.phpunit.result.cache
6+
.php-cs-fixer.cache

src/Analysis/Analyser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private function getDefaultRoutesToIgnore(): array
7979
{
8080
return [
8181
'^_profiler.*$',
82-
'_wdt*',
82+
'_wdt.*',
8383
'_webhook_controller',
8484
'_preview_error',
8585
'app.swagger',

tests/Analysis/AnalyserTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function testAnalysis(): void
2323
$routeCollection->add('route3', new Route('/route3'));
2424
$routeCollection->add('ignored_route1', new Route('/ignored_route1'));
2525
$routeCollection->add('_wdt', new Route('/_wdt'));
26+
$routeCollection->add('_wdt_stylesheet', new Route('/_wdt_stylesheet'));
2627

2728
/** @var RouterInterface&MockObject $router */
2829
$router = $this->createMock(RouterInterface::class);

0 commit comments

Comments
 (0)