This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
lib/internal/Magento/Framework/View/Asset Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ class Merged implements \Iterator
4040 */
4141 protected $ contentType ;
4242
43+ /**
44+ * @var StorageInterface
45+ */
46+ private $ versionStorage ;
47+
4348 /**
4449 * @var bool
4550 */
@@ -56,11 +61,13 @@ public function __construct(
5661 \Psr \Log \LoggerInterface $ logger ,
5762 MergeStrategyInterface $ mergeStrategy ,
5863 \Magento \Framework \View \Asset \Repository $ assetRepo ,
64+ \Magento \Framework \App \View \Deployment \Version \StorageInterface $ versionStorage ,
5965 array $ assets
6066 ) {
6167 $ this ->logger = $ logger ;
6268 $ this ->mergeStrategy = $ mergeStrategy ;
6369 $ this ->assetRepo = $ assetRepo ;
70+ $ this ->versionStorage = $ versionStorage ;
6471
6572 if (!$ assets ) {
6673 throw new \InvalidArgumentException ('At least one asset has to be passed for merging. ' );
@@ -116,6 +123,12 @@ private function createMergedAsset(array $assets)
116123 $ paths [] = $ asset ->getPath ();
117124 }
118125 $ paths = array_unique ($ paths );
126+
127+ $ version =$ this ->versionStorage ->load ();
128+ if ($ version ) {
129+ $ paths []=$ version ;
130+ }
131+
119132 $ filePath = md5 (implode ('| ' , $ paths )) . '. ' . $ this ->contentType ;
120133 return $ this ->assetRepo ->createArbitrary ($ filePath , self ::getRelativeDir ());
121134 }
You can’t perform that action at this time.
0 commit comments