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:
Anthon Pang 2012-04-30 22:25:24 -04:00
parent 59dd4df7f4
commit 1ed8b720ac

View File

@ -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);