/** * @return string */ public function getApplicationTempDir() { $namespace = $this->project->getProjectNamespace(); $dir = $this->getTempDir(); if (strpos($this->normalizePath($dir), $this->normalizePath($this->project->getProjectDir())) !== 0) { $dir = $this->normalizePath($dir . DIRECTORY_SEPARATOR . $namespace); } if (!is_dir($dir)) { if (!mkdir($dir, 0777, true)) { throw new \RuntimeException('Could not create application temp dir'); } } return $this->normalizePath($dir . DIRECTORY_SEPARATOR); }