File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,19 @@ public function warmUp($cacheDir)
66
66
67
67
$ arrayPool = new ArrayAdapter (0 , false );
68
68
$ reader = new CachedReader ($ this ->annotationReader , new DoctrineProvider ($ arrayPool ));
69
-
70
- foreach ($ annotatedClasses as $ class ) {
71
- $ this ->readAllComponents ($ reader , $ class );
69
+ $ throwingAutoloader = function ($ class ) { throw new \ReflectionException (sprintf ('Class %s does not exist ' , $ class )); };
70
+ spl_autoload_register ($ throwingAutoloader );
71
+
72
+ try {
73
+ foreach ($ annotatedClasses as $ class ) {
74
+ try {
75
+ $ this ->readAllComponents ($ reader , $ class );
76
+ } catch (\ReflectionException $ e ) {
77
+ // ignore failing reflection
78
+ }
79
+ }
80
+ } finally {
81
+ spl_autoload_unregister ($ throwingAutoloader );
72
82
}
73
83
74
84
$ values = $ arrayPool ->getValues ();
You can’t perform that action at this time.
0 commit comments