<p dir="auto">For a week now, sometines, the namespaces property in bootstrap.php.cache is null, which trigger this error:</p>
<p dir="auto">Notice: Trying to get property of non-object in app/bootstrap.php.cache on line 1211<br>
Warning: Invalid argument supplied for foreach() in app/bootstrap.php.cache on line 1211<br>
Notice: Trying to get property of non-object in app/bootstrap.php.cache on line 1225<br>
Warning: Invalid argument supplied for foreach() in app/bootstrap.php.cache on line 1225<br>
Fatal error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in app/autoload.php on line 35</p>
<p dir="auto">And after a few hours, without doing anything special, everything returns to normal, until the error reappears.<br>
What makes me create a bug is that, a little annoyed by this error, I completely deleted my project, downloaded the latest  symfony version, re-installed my vendors to get back on a clean. But the error is still there...</p>
<p dir="auto">I checked three times, the class AnnotationRegistry exists in my project.<br>
It can not be a issue between incompatible version bundle, since it is a clean symfony that is installed.</p>
<p dir="auto">Is there a hidden cache in symfony | doctrine that I could empty ? How can it be that even after reinstalling my symfony version, the error is still there? More generally, how is it possible that the namespaces property is empty in bootstrap.php.cache ?</p>
<p dir="auto">I am aware that github is not a support forum, but I feel that there is here an issue that goes beyond my Symfony installation. It's strange that the error persists even after reinstalling symfony.</p>
<p dir="auto">Some unexpected happens with my symfony2 app in production environment.<br>
I always getting 500 Internal Sever Error with following log message:<br>
PHP Fatal error:  Class 'Doctrine\Common\ClassLoader' not found in /var/www/cosamui/app/autoload.php on line 47</p>
<p dir="auto">Code on line 47:<br>
$classLoader = new \Doctrine\Common\ClassLoader('DoctrineExtensions', <strong>DIR</strong> . '/../vendor/DoctrineExtensions');</p>
<p dir="auto">I ensured that the doctrine extension exists... And It also work's some times. But every 5 request I get this error and a plain site :(</p>
<p dir="auto">I've tried to comment out the this line above, because it's not really necessary... But if i to that it does the same... But I get this error:<br>
Fatal error:  Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in /var/www/cosamui/app/autoload.php on line 49</p>
<p dir="auto">Now the AnnatationRegistry can't found at every 5 request...</p>
<p dir="auto">Does anyone know what's going on there??</p>