How to configure asset versioning through Assetic in Symfony 3.2?
In Symfony 2, this could be achieved by setting the version of packages in framework:templating, but this is no longer the case in 3.
I tried using the following configuration:
framework:
assets:
packages:
css:
version: '2'
version_format: '%%s?version=%%s'
When using this in a template:
{% stylesheets output="css/global.css" "@AppBundle/Resources/assets/scss/frontend.scss" filter="scss" filter="?uglifycss" package="css" %}
<link rel="stylesheet" href="{{ asset(asset_url) }}">
{% endstylesheets %}
Unfortunately, this does not add the version parameter to the resource URL, despite the fact that Symfony's official asset documentation offers .
source
share