Clearing the cache deletes the web/bundles/app folder

Viewed 186

Whenever the cache is cleared in my Symfony project, either manually or e.g. via composer update, the public assets folder web/bundles/app is deleted.

I've got no idea why this is, it never happened on any of my previous Symfony projects (only a couple, but still). Google returns absolutely nothing, which I find really strange. I've asked a friend of mine that's been working with Symfony for a few years and he told me he's never seen that happen before.

I'm sorry I don't provide any code for this question, but I have literally no idea where the problem might come from. I'll update this with code requested in the comments if needed.

2 Answers

I dont know about that problem but if you need to clear cache you can do that manualy by deleting var/cache/dev folder content. MIght help until you find where problem is.

Did you check your composer.json file?

"extra": {                                 
"symfony-app-dir": "app",              
"symfony-bin-dir": "bin",              
"symfony-var-dir": "var",              
"symfony-web-dir": "web",              
"symfony-tests-dir": "tests",          
"symfony-assets-install": "relative",  
"incenteev-parameters": {              
    "file": "app/config/parameters.yml"
},                                     
"branch-alias": null}

Maybe you need to look these lines. This is default composer.json file. In my opinion you changed your directory name from var/ to app/ that is why you have trouble.

If I didn't solve your problem just comment it. I'll look again.

Related