浏览代码

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.
Anthon Pang 13 年之前
父节点
当前提交
1ed8b720ac
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php

+ 1 - 5
src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php

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