Currently is is necessary to instantiate the UriContextCollection before using the RoutingAuto system:
$uriContextCollection = new UriContextCollection($document);
$arm->buildUriContextCollection($uriContextCollection);
foreach ($uriContextCollection->getUriContexts() as $context) {
$autoRoute = $uriContext->getAutoRoute();
// save auto route
}
But this causes potential BC breaks in the future as the URIContextCollection class is going to
be present in third-party code. It should be contained within the manager.