File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/Symfony/Component/DependencyInjection/Config Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1212namespace Symfony \Component \DependencyInjection \Config ;
1313
1414use Symfony \Component \Config \Resource \SelfCheckingResourceInterface ;
15+ use Symfony \Component \DependencyInjection \Compiler \AutowirePass ;
1516
1617class AutowireServiceResource implements SelfCheckingResourceInterface, \Serializable
1718{
@@ -32,7 +33,19 @@ public function isFresh($timestamp)
3233 return false ;
3334 }
3435
35- return @filemtime ($ this ->filePath ) <= $ timestamp ;
36+ // has the file *not* been modified? Definitely fresh
37+ if (@filemtime ($ this ->filePath ) <= $ timestamp ) {
38+ return true ;
39+ }
40+
41+ try {
42+ $ reflectionClass = new \ReflectionClass ($ this ->class );
43+ } catch (\ReflectionException $ e ) {
44+ // the class does not exist anymore!
45+ return false ;
46+ }
47+
48+ return (array ) $ this === (array ) AutowirePass::createResourceForClass ($ reflectionClass );
3649 }
3750
3851 public function __toString ()
You can’t perform that action at this time.
0 commit comments