Fix profiler route includes

This commit is contained in:
Alexander Schranz
2026-02-07 17:58:09 +01:00
parent 7242b9cadb
commit e89287262e
2 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
prefix: /_profiler

View File

@@ -5,11 +5,15 @@ use Symfony\Component\Routing\RouteCollection;
$collection = new RouteCollection();
$collection->addCollection(
$loader->import(__DIR__.'/routes/web_profiler.yaml')
$loader->import(
\file_exists(__DIR__.'/../../../../vendor/symfony/web-profiler-bundle/Resources/config/routing/wdt.php')
? __DIR__.'/routes/web_profiler_sf8.yaml'
: __DIR__.'/routes/web_profiler.yaml'
),
);
$collection->addCollection(
$loader->import(__DIR__.'/routes/routes.yaml')
$loader->import(__DIR__.'/routes/routes.yaml'),
);
return $collection;