File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/Symfony/Bundle/FrameworkBundle/CacheWarmer Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function warmUp($cacheDir)
6262 }
6363
6464 $ adapter = new PhpArrayAdapter ($ this ->phpArrayFile , $ this ->fallbackPool );
65- $ arrayPool = new ArrayAdapter (0 , false );
65+ $ arrayPool = new ArrayAdapter (0 );
6666
6767 $ loaders = $ this ->validatorBuilder ->getLoaders ();
6868 $ metadataFactory = new LazyLoadingMetadataFactory (new LoaderChain ($ loaders ), new Psr6Cache ($ arrayPool ));
@@ -86,7 +86,10 @@ public function warmUp($cacheDir)
8686 spl_autoload_unregister (array ($ adapter , 'throwOnRequiredClass ' ));
8787 }
8888
89- $ values = $ arrayPool ->getValues ();
89+ // the ArrayAdapter stores the values serialized as the MetaData objects
90+ // are mutated inside LazyLoadingMetadataFactory after being written into the cache
91+ // so here we un-serialize the values first
92+ $ values = array_map (function ($ val ) { return<
49BF
/span> unserialize ($ val ); }, $ arrayPool ->getValues ());
9093 $ adapter ->warmUp (array_filter ($ values ));
9194
9295 foreach ($ values as $ k => $ v ) {
You can’t perform that action at this time.
0 commit comments