Skip to content

Commit fd97168

Browse files
authored
Merge pull request #1 from maxime-aknin/patch-cache-warmer-eval
Catch filemtime warning thrown as ErrorException
2 parents 8e8207b + 074f8ae commit fd97168

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function readAllComponents(Reader $reader, string $class)
8585

8686
try {
8787
$reader->getClassAnnotations($reflectionClass);
88-
} catch (AnnotationException $e) {
88+
} catch (AnnotationException | \ErrorException $e) {
8989
/*
9090
* Ignore any AnnotationException to not break the cache warming process if an Annotation is badly
9191
* configured or could not be found / read / etc.
@@ -99,14 +99,14 @@ private function readAllComponents(Reader $reader, string $class)
9999
foreach ($reflectionClass->getMethods() as $reflectionMethod) {
100100
try {
101101
$reader->getMethodAnnotations($reflectionMethod);
102-
} catch (AnnotationException $e) {
102+
} catch (AnnotationException | \ErrorException $e) {
103103
}
104104
}
105105

106106
foreach ($reflectionClass->getProperties() as $reflectionProperty) {
107107
try {
108108
$reader->getPropertyAnnotations($reflectionProperty);
109-
} catch (AnnotationException $e) {
109+
} catch (AnnotationException | \ErrorException $e) {
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)