File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use TYPO3\Surf\Cli\Symfony\ConsoleKernel;
2020requireAutoloader ();
2121
2222
23- $ kernel = new ConsoleKernel ('prod ' );
23+ $ kernel = new ConsoleKernel ('prod ' , ' 3.6.1 ' );
2424$ kernel ->boot ();
2525$ container = $ kernel ->getContainer ();
2626/** @var ConsoleApplication $application */
Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ final class ConsoleKernel
3131 private ?Container $ container = null ;
3232 private string $ environment ;
3333 private ?string $ projectDir = null ;
34+ private string $ version ;
3435
35- public function __construct (string $ environment = 'dev ' )
36+ public function __construct (string $ environment = 'dev ' , string $ version = '' )
3637 {
3738 $ this ->environment = $ environment ;
39+ $ this ->version = str_replace ('. ' , '_ ' , $ version );
3840 }
3941
4042 private function registerContainerConfiguration (LoaderInterface $ loader ): void
@@ -122,10 +124,10 @@ private function initializeContainer(): void
122124 protected function getCacheDir (): string
123125 {
124126 if (Phar::running () !== '' ) {
125- return sys_get_temp_dir () . '/_surf ' ;
127+ return sys_get_temp_dir () . '/_surf_ ' . $ this -> version ;
126128 }
127129
128- return $ this ->getProjectDir () . '/var/cache/ ' . $ this ->environment ;
130+ return $ this ->getProjectDir () . '/var/cache/ ' . $ this ->version . ' / ' . $ this -> environment ;
129131 }
130132
131133 private function getProjectDir (): string
You can’t perform that action at this time.
0 commit comments