I need to display in the footer of my app the assets version set in app/config.yml file:
framework:
templating:
engines: ['twig']
assets_version: v2.6.2
How can I get in Twig or in a controller the assets_version value?
You can use the AssetsExtension's getAssetsVersion method.
So, in a controller:
$this->container->get('templating.helper.assets')->getVersion();
Or in a Twig file:
{{ assets_version() }}