Explorar o código

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 %!s(int64=13) %!d(string=hai) anos
pai
achega
1ed8b720ac
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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);