Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony3 cache (Warning: rename) after update

I have problem, after insert or update in my screen i see message:

Warning: rename(C:\Users\Name\Desktop\BaseApp\var\cache\dev/doctrine/orm/Proxies__CG__AppBundleEntityCategory.php.57483ae07bdb29.50220410,C:\Users\Name\Desktop\BaseApp\var\cache\dev/doctrine/orm/Proxies__CG__AppBundleEntityCategory.php):

All time after update i see this message, after reload page all is right, i use my app on windows, dev mode, symfony3,

Regards!

like image 745
user3501587 Avatar asked May 27 '16 12:05

user3501587


1 Answers

The problem is that the Doctrine's proxy class generation code doesn't handle concurrent requests very well. It works on Unix-like systems, but not on Windows, where you can't just rename over a file that is open.

See configuration of the doctrine bundle. You'll most like have auto_generate_proxy_classes set to "%kernel.debug%" (this is the default setting in symfony standard edition).

Try changing auto_generate_proxy_classes to false. You'll now have to manually clear the cache if you change your entities, but that error should be gone.

like image 132
ShiraNai7 Avatar answered Sep 17 '22 18:09

ShiraNai7