I’ve come across a problem which is explained well in this GitHub issue
https://github.com/symfony/symfony/issues/4514
Short version: It’s not possible to render asset URLs from the CLI because there is no Request object. The Github issue is closed. I suppose it is not a bug, but it is stopping my system from rendering HTML emails in cronjobs.
So my question:
Is there a way to allow templates to use {{ asset() }} from within a Symfony Command where there is no server request scope?
Some kind of dummy request sounds like it could work, but I have no idea how to get into that particular black box.
Like explained in how to send emails in console command
do like this