fixed now. Fabien
-- Fabien Potencier Sensio CEO - Symfony lead developer sensiolabs.com | symfony.com | fabien.potencier.org Tél: +33 1 40 99 80 80 On 6/6/11 8:06 PM, Bart van den Burg wrote:
I was getting the following error when I tried to run a test involving Doctrine Entity Manager: 1) MN\ImportBundle\Tests\Entity \ttPageTest::testFetchRecordFromDatabase ErrorException: Warning: file_put_contents(/home/bart/websites/[...]/ app/cache/test/doctrine/orm/Proxies/ MNImportBundleEntityttPageProxy.php): failed to open stream: No such file or directory in /home/bart/websites/[...]/vendor/doctrine/lib/ Doctrine/ORM/Proxy/ProxyFactory.php line 155 /home/bart/websites/[...]/app/bootstrap.php.cache:375 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/Proxy/ ProxyFactory.php:155 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/Proxy/ ProxyFactory.php:83 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/ UnitOfWork.php:1927 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/Persisters/ BasicEntityPersister.php:816 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/Persisters/ BasicEntityPersister.php:554 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/ EntityRepository.php:118 /home/bart/websites/[...]/vendor/doctrine/lib/Doctrine/ORM/ EntityManager.php:344 /home/bart/websites/[...]/src/MN/ImportBundle/Tests/Entity/ ttPageTest.php:19 The tests work fine when I manually create the /home/bart/websites/ [...]/app/cache/test/doctrine/orm/Proxies/ directory. After browsing the code, I found out the following line in Symfony/Component/ HttpKernel/Kernel is causing the problem: if (!$fresh&& 'cli' !== php_sapi_name()) { $this->container->get('cache_warmer')->warmUp($this-container->getParameter('kernel.cache_dir'));} (added in https://github.com/symfony/symfony/commit/d0b4bfc8f61becce7cb31a3435bf31ad60e0dd62) if i comment out the if, my tests run OK. Is there a reason the cache is not warmed when the script is executed from CLI? To me this feels like a bug, because my tests don't work, even though the production and development environments from the browser work fine...
-- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
