Skip to content

Commit 029be56

Browse files
committed
Reworded everything
1 parent 5f431ef commit 029be56

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

reference/configuration/framework.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,13 +1093,9 @@ version_strategy
10931093

10941094
**type**: ``string`` **default**: ``null``
10951095

1096-
The service id of the asset version strategy applied to the assets. In addition
1097-
to your own :doc:`custom asset version strategies </frontend/custom_version_strategy>`,
1098-
Symfony defines two services for its :ref:`built-in strategies <component-assets-versioning>`:
1099-
``assets.empty_version_strategy`` and ``assets.static_version_strategy``.
1100-
1101-
The ``assets.empty_version_strategy`` is useful to override the global asset
1102-
versioning strategy inside an asset package:
1096+
The service id of the :doc:`asset version strategy </frontend/custom_version_strategy>`
1097+
applied to the assets. This option can be set globally for all assets and
1098+
individually for each asset package:
11031099

11041100
.. configuration-block::
11051101

@@ -1108,12 +1104,15 @@ versioning strategy inside an asset package:
11081104
# app/config/config.yml
11091105
framework:
11101106
assets:
1111-
# this strategy is applied to every asset (including packages) ...
1107+
# this strategy is applied to every asset (including packages)
11121108
version_strategy: 'app.asset.my_versioning_strategy'
11131109
packages:
11141110
foo_package:
1115-
# ... except if a package explicitly uses the empty strategy
1116-
version_strategy: 'assets.empty_version_strategy'
1111+
# this makes the assets of this package to not be versioned
1112+
version: ~
1113+
bar_package:
1114+
# this package doesn't use the global versioning strategy
1115+
version_strategy: 'app.asset.another_version_strategy'
11171116
11181117
.. code-block:: xml
11191118
@@ -1129,7 +1128,10 @@ versioning strategy inside an asset package:
11291128
<framework:assets version_strategy="app.asset.my_versioning_strategy">
11301129
<framework:package
11311130
name="foo_package"
1132-
version-strategy="assets.empty_version_strategy" />
1131+
version="null" />
1132+
<framework:package
1133+
name="bar_package"
1134+
version-strategy="app.asset.another_version_strategy" />
11331135
</framework:assets>
11341136
</framework:config>
11351137
</container>
@@ -1143,7 +1145,11 @@ versioning strategy inside an asset package:
11431145
'packages' => array(
11441146
'foo_package' => array(
11451147
// ...
1146-
'version_strategy' => 'assets.empty_version_strategy',
1148+
'version' => null,
1149+
),
1150+
'bar_package' => array(
1151+
// ...
1152+
'version_strategy' => 'app.asset.another_version_strategy',
11471153
),
11481154
),
11491155
),

0 commit comments

Comments
 (0)