Autoloader should not throw exception because PHP will continue to call other registered autoloaders.
Change 'require' to non-fatal '@include' in the event no file is generated. Let PHP handle the undefined class, natively.
This commit is contained in:
parent
59dd4df7f4
commit
1ed8b720ac
@ -79,13 +79,9 @@ class DoctrineBundle extends Bundle
|
||||
}
|
||||
|
||||
clearstatcache($file);
|
||||
|
||||
if (!file_exists($file)) {
|
||||
throw new \RuntimeException(sprintf('The proxy file "%s" does not exist. If you still have objects serialized in the session, you need to clear the session manually.', $file));
|
||||
}
|
||||
}
|
||||
|
||||
require $file;
|
||||
@include $file;
|
||||
}
|
||||
};
|
||||
spl_autoload_register($this->autoloader);
|
||||
|
Reference in New Issue
Block a user