1010namespace Symfony \WebpackEncoreBundle \Asset ;
1111
1212use Symfony \Component \Asset \Packages ;
13- use Symfony \Component \DependencyInjection \ServiceLocator ;
1413use Symfony \Contracts \EventDispatcher \EventDispatcherInterface ;
1514use Symfony \Contracts \Service \ResetInterface ;
1615use Symfony \WebpackEncoreBundle \Event \RenderAssetTagEvent ;
@@ -30,27 +29,14 @@ class TagRenderer implements ResetInterface
3029 private $ renderedFiles = [];
3130
3231 public function __construct (
33- $ entrypointLookupCollection ,
32+ EntrypointLookupCollectionInterface $ entrypointLookupCollection ,
3433 Packages $ packages ,
3534 array $ defaultAttributes = [],
3635 array $ defaultScriptAttributes = [],
3736 array $ defaultLinkAttributes = [],
3837 EventDispatcherInterface $ eventDispatcher = null
3938 ) {
40- if ($ entrypointLookupCollection instanceof EntrypointLookupInterface) {
41- @trigger_error (sprintf ('The "$entrypointLookupCollection" argument in method "%s()" must be an instance of EntrypointLookupCollection. ' , __METHOD__ ), \E_USER_DEPRECATED );
42-
43- $ this ->entrypointLookupCollection = new EntrypointLookupCollection (
44- new ServiceLocator (['_default ' => function () use ($ entrypointLookupCollection ) {
45- return $ entrypointLookupCollection ;
46- }])
47- );
48- } elseif ($ entrypointLookupCollection instanceof EntrypointLookupCollectionInterface) {
49- $ this ->entrypointLookupCollection = $ entrypointLookupCollection ;
50- } else {
51- throw new \TypeError ('The "$entrypointLookupCollection" argument must be an instance of EntrypointLookupCollectionInterface. ' );
52- }
53-
39+ $ this ->entrypointLookupCollection = $ entrypointLookupCollection ;
5440 $ this ->packages = $ packages ;
5541 $ this ->defaultAttributes = $ defaultAttributes ;
5642 $ this ->defaultScriptAttributes = $ defaultScriptAttributes ;
@@ -150,6 +136,9 @@ public function getDefaultAttributes(): array
150136 return $ this ->defaultAttributes ;
151137 }
152138
139+ /**
140+ * @return void
141+ */
153142 public function reset ()
154143 {
155144 $ this ->renderedFiles = [
0 commit comments