Specify cache locations for build tools

This commit is contained in:
Ben Ramsey
2020-02-08 13:13:47 -06:00
parent 0bff9e8660
commit f965293da9
7 changed files with 37 additions and 17 deletions
+9 -1
View File
@@ -16,9 +16,17 @@ use AspectMock\Kernel;
require_once __DIR__ . '/../vendor/autoload.php'; // composer autoload
require_once __DIR__ . '/phpstan-bootstrap.php';
$cacheDir = __DIR__ . '/../build/cache/goaop';
if (!is_dir($cacheDir)) {
if (mkdir($cacheDir, 0775, true) === false) {
echo "\n[ERROR] Unable to create cache directory at {$cacheDir}\n\n";
exit(1);
}
}
$kernel = Kernel::getInstance();
$kernel->init([
'debug' => true,
'cacheDir' => sys_get_temp_dir(),
'cacheDir' => $cacheDir,
'includePaths' => [__DIR__ . '/../src']
]);