소스 검색

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