Last active
December 4, 2017 23:50
-
-
Save exts/720071e7cacc9fe8ada3e882d6261990 to your computer and use it in GitHub Desktop.
Symfony 4, Symfony Flex, Vagrant, Failed to remove directory (cache, de~, pools), Windows 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Kernel extends BaseKernel | |
{ | |
use MicroKernelTrait; | |
const CONFIG_EXTS = '.{php,xml,yaml,yml}'; | |
public function getCacheDir() | |
{ | |
//add this when using vagrant to store cache in your vagrant temp folder | |
//there's a weird issue with guest machines & shared folders so some folders | |
//will exists locally on your windows machine, but not shared on your vm so this solves that issue | |
//fuck yeah | |
//shoutout to: https://stackoverflow.com/a/47296954 | |
if ($this->environment === 'dev') { | |
return '/tmp/symfony/cache'; | |
} | |
return $this->getProjectDir().'/var/cache/'.$this->environment; | |
} | |
//... other methods | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment