Stale temp directories after running phpmd/phpcs/phpcsfixer


I use these three tools (PHP Mess Detector, Code Sniffer, CS Fixer). The integration into PhpStorm works flawlessly.

What annoys me is that PhpStorm does not clean up the auxiliary dirs in my /tmp directory after calling the tools.
After few minutes of work there are hundreds of them. This makes /tmp unusable for normal usage. Just a fraction:

1) is it possible to make PhpStorm clean up these directories when they are not needed any more?

2) if not, is there a way to change their location so they don't flood the top-level tmp directory?


Thanks for any ideas.

Comment actions Permalink

Unfortunately, the answer is 'no' to both questions, you can make PhpStorm to neither clean up after itself nor change the directory.
You can create a usability issue on our tracker, but I asked the dev what she thinks about it, and she doubts it's going to be our top priority.

I wonder what you mean by the 'normal usage' of the /tmp directory though.

Comment actions Permalink

Thanks for your input.

By 'normal usage' I mean, for example, being able to look up a file in a file manager without having to scroll down over hundreds of lines of garbage.

Anyway, I found a solution after all. I added this to my VM options

and PhpStorm seems to respect that, it creates its working files in that subdirectory now.



Comment actions Permalink

Thank you for sharing the workaround, I was close to thinking about it but only checked the registry for tmp/temp and didn't care to google, shame on me.

Comment actions Permalink

Having the same issue:

THOUSANDS of silly leftover empty folder hierarchies in the form of:


in my %APPDATA%\Local\Temp folder.


(PHPStorm 2020.1.1)


Please sign in to leave a comment.