Skip to content

Commit 90f4ca7

Browse files
committed
feature/do-not-load-docs-routes-if-docs-disabled
1 parent 133028e commit 90f4ca7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Routing/ApiLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ public function supports(mixed $resource, ?string $type = null): bool
127127
*/
128128
private function loadExternalFiles(RouteCollection $routeCollection): void
129129
{
130-
$routeCollection->addCollection($this->fileLoader->load('docs.xml'));
130+
if ($this->docsEnabled) {
131+
$routeCollection->addCollection($this->fileLoader->load('docs.xml'));
132+
}
133+
131134
$routeCollection->addCollection($this->fileLoader->load('genid.xml'));
132135
$routeCollection->addCollection($this->fileLoader->load('errors.xml'));
133136

0 commit comments

Comments
 (0)