src/AppKernel.php
public function loadRoutes(LoaderInterface $loader)
    {
        $routes = new RouteCollectionBuilder($loader);
        $routes->import(__DIR__.'/config/routing.yml');

        return $routes->build();
    }
public function loadRoutes(LoaderInterface $loader)
    {
        $routes = new RouteCollectionBuilder($loader);
        $routes->import(__DIR__.'/config/routing.yml');

        return $routes->build();
    }
(From MicroKernelTrait).

@internal