Reputation: 309
I run the command
php app\console cache:clear
And get the fowllowing answer in a local environnement in Windows
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove directory "D:\nginx\web\symfony\dev\var\cache\de~\annotations\fd"
I first checked if the weird de~ folder existed and deleted it running :
mkdir empty
c:\Windows\System32\Robocopy.exe /MIR empty cache *
which by the way works also to delete too long file names in the cache folder.
Then I checked in windows ui the cache folders, I had a previous cache folder in the app directory and now that I updated Symfony using composer (v2.8.7), it appears to be in the var folder.
All those cache folders are empty, but I still get the weird message with that de~ folder that does not exist anymore.
I know I worked with annotations to improve my entities to create a postgresql database and tables with correct behavior and modified my config file to use entity managers to have more control over which tables tables to create but I don't know if that error comes from there as I use Doctrine annotations in these entities files.
Upvotes: 0
Views: 3393
Reputation: 1802
Try adding the --no-warmup
flag to the cache clear command:
$ php app\console cache:clear --no-warmup
This has negated strange cache errors for me in the past. Otherwise some wrong permissions are probably being set somewhere.
Upvotes: 2