File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,12 @@ public function isOptional()
43
43
44
44
/**
45
45
* {@inheritdoc}
46
+ *
47
+ * @return string[] A list of files to preload on PHP 7.4+
46
48
*/
47
49
public function warmUp (string $ cacheDir )
48
50
{
51
+ $ files = [];
49
52
foreach ($ this ->registry ->getManagers () as $ em ) {
50
53
// we need the directory no matter the proxy cache generation strategy
51
54
if (!is_dir ($ proxyCacheDir = $ em ->getConfiguration ()->getProxyDir ())) {
@@ -64,6 +67,14 @@ public function warmUp(string $cacheDir)
64
67
$ classes = $ em ->getMetadataFactory ()->getAllMetadata ();
65
68
66
69
$ em ->getProxyFactory ()->generateProxyClasses ($ classes );
70
+
71
+ foreach (scandir ($ proxyCacheDir ) as $ file ) {
72
+ if (!is_dir ($ file = $ proxyCacheDir .'/ ' .$ file )) {
73
+ $ files [] = $ file ;
74
+ }
75
+ }
67
76
}
77
+
78
+ return $ files ;
68
79
}
69
80
}
You can’t perform that action at this time.
0 commit comments