Skip to content

Commit

Permalink
[BUGFIX] Use available cache and log directory
Browse files Browse the repository at this point in the history
- For the phar context we need a cache and log directory for the DI-Container outside of the phar file
  • Loading branch information
sabbelasichon committed Dec 4, 2020
1 parent 92610d9 commit 5f7433d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Cli/Symfony/ConsoleKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,16 @@ protected function build(ContainerBuilder $containerBuilder): void
[new Reference(ShellCommandService::class)]
);
}

public function getCacheDir(): string
{
// manually configured, so it can be replaced in phar
return sys_get_temp_dir() . '/_surf';
}

public function getLogDir(): string
{
// manually configured, so it can be replaced in phar
return sys_get_temp_dir() . '/_surf_log';
}
}

0 comments on commit 5f7433d

Please sign in to comment.