[DependencyInjection] Fix tests of #18144

This commit is contained in:
Jules Pietri 2016-04-03 20:20:00 +02:00 committed by Nicolas Grekas
parent cef7e5b1b0
commit 5e7dbae9a3

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Config;
use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;
class AutowireServiceResource implements SelfCheckingResourceInterface, \Serializable
{
@ -33,20 +32,7 @@ class AutowireServiceResource implements SelfCheckingResourceInterface, \Seriali
return false;
}
// has the file *not* been modified? Definitely fresh
if (@filemtime($this->filePath) <= $timestamp) {
return true;
}
try {
$reflectionClass = new \ReflectionClass($this->class);
} catch (\ReflectionException $e) {
// the class does not exist anymore!
return false;
}
return AutowirePass::createResourceForClass($reflectionClass);
return @filemtime($this->filePath) <= $timestamp;
}
public function __toString()