<p dir="auto">HI.<br>
I am trying to make some routes of my application to require a subdomain.<br>
I have added this to my routing.yml</p>
<p dir="auto">my_route:<br>
resource: "@MyBundle/Resources/config/routing.yml"<br>
host:     "{subdomain}.{domain}"<br>
prefix:   /some-path<br>
requirements:<br>
domain: %domain%<br>
subdomain: .+</p>
<p dir="auto">The route is matched correctly but when I try to use path in twig it shows the folloing error:<br>
An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("subdomain", "domain")</p>
<p dir="auto">The host shouldnt be set automaticly? Even using the url function instead of path shows me the same error.<br>
I have to explicity add the subdomain and domain parameters to the path twig function.</p>
<p dir="auto">Is there an easier way?</p>
<p dir="auto">Currently running into an issue with the new host matching when I'm trying to generate urls that requires me to pass in a host parameter.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InternalUserController:
    resource: &quot;@ApiBundle/Controller/Internal/UserController.php&quot;
    type: annotation
    host: &quot;api.{domain}&quot;

DashboardController:
    resource: &quot;@DashboardBundle/Controller/DashboardController.php&quot;
    type: annotation
    host: &quot;{domain}&quot;"><pre lang="ymal" class="notranslate"><code class="notranslate">InternalUserController:
    resource: "@ApiBundle/Controller/Internal/UserController.php"
    type: annotation
    host: "api.{domain}"

DashboardController:
    resource: "@DashboardBundle/Controller/DashboardController.php"
    type: annotation
    host: "{domain}"
</code></pre></div>
<p dir="auto">The examples above work perfectly with the url matcher, but when needing to generate the url, it will require me to provide the domain parameter each time. I know this is how it's suppose to function, but it seems a bit annoying to require putting in the domain each time.</p>