From 90f4ca77c811e072be99d86731f7265a0b4d6b3c Mon Sep 17 00:00:00 2001 From: Aleksey Polyvanyi Date: Wed, 8 Oct 2025 14:24:57 +0200 Subject: [PATCH] feature/do-not-load-docs-routes-if-docs-disabled --- src/Symfony/Routing/ApiLoader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Routing/ApiLoader.php b/src/Symfony/Routing/ApiLoader.php index 7b6badb9f2..530b36fb8d 100644 --- a/src/Symfony/Routing/ApiLoader.php +++ b/src/Symfony/Routing/ApiLoader.php @@ -127,7 +127,10 @@ public function supports(mixed $resource, ?string $type = null): bool */ private function loadExternalFiles(RouteCollection $routeCollection): void { - $routeCollection->addCollection($this->fileLoader->load('docs.xml')); + if ($this->docsEnabled) { + $routeCollection->addCollection($this->fileLoader->load('docs.xml')); + } + $routeCollection->addCollection($this->fileLoader->load('genid.xml')); $routeCollection->addCollection($this->fileLoader->load('errors.xml'));