@@ -10,7 +10,7 @@ How to Use a Custom Version Strategy for Assets
10
10
Asset versioning is a technique that improves the performance of web
11
11
applications by adding a version identifier to the URL of the static assets
12
12
(CSS, JavaScript, images, etc.) When the content of the asset changes, its
13
- identifier is also modified to force the browser download it again instead of
13
+ identifier is also modified to force the browser to download it again instead of
14
14
reusing the cached asset.
15
15
16
16
Symfony supports asset versioning thanks to the
@@ -103,16 +103,14 @@ version string::
103
103
104
104
private function loadManifest(array $options)
105
105
{
106
- $hashes = json_decode(file_get_contents($this->manifestPath), true);
107
-
108
- return $hashes;
106
+ return json_decode(file_get_contents($this->manifestPath), true);
109
107
}
110
108
}
111
109
112
110
Register the Strategy Service
113
111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114
112
115
- After creating the strategy PHP class, register it as a Symfony service
113
+ After creating the strategy PHP class, register it as a Symfony service.
116
114
117
115
.. configuration-block ::
118
116
@@ -186,7 +184,7 @@ the :ref:`version_strategy <reference-framework-assets-version_strategy>` option
186
184
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
187
185
188
186
<framework : con
8000
fig >
189
- <framework : assets version_strategy =" app.assets.versioning.gulp_buster" />
187
+ <framework : assets version-strategy =" app.assets.versioning.gulp_buster" />
190
188
</framework : config >
191
189
</container >
192
190
0 commit comments