-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
I've notice that once you use different URLs for http & ssl assets_base_urls
, the scope of templating.helper.assets
is set to "request" (link to code). I understand this behavior (the service has to known which url to serve according to current request scheme), but it blocks me when I need to render a template which use the {{ asset() }}
method in CLI, because You cannot create a service ("templating.helper.assets") of an inactive scope ("request").
Here is a simple PoC : MattKetmo/symfony-standard@master...assets-cli
I may expect in this condition that the base url fallbacks to one the the given url (for instance the http one). I tried to look at the templating package system, but in any case, the asset
method directly use the "request-scoped service" so that's not a solution.
Is there any recommendation about the use of the "templating.helper.assets" service in CLI when it goes to the request scope?