Skip to content

Commit 25ecf9f

Browse files
committed
Refactor Symfony cache directory
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
1 parent d313c17 commit 25ecf9f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Kernel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@ public function boot(): void
4545
$_SERVER['COMPOSER_CACHE_DIR'] = $this->container->getParameter('dirigent.storage.path') . '/composer-cache';
4646
$_SERVER['COMPOSER_HOME'] = $this->container->getParameter('dirigent.storage.path') . '/composer';
4747
}
48+
49+
#[\Override]
50+
public function getCacheDir(): string
51+
{
52+
return sprintf('%s/var/cache/symfony/%s', $this->getProjectDir(), $this->environment);
53+
}
4854
}

tests/Docker/Standalone/PhpPlatformTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function testComposerPlatformRequirements(): void
1515
public function testSymfonyCacheGenerated(): void
1616
{
1717
$this->assertContainerFileExists(
18-
'var/cache/prod/CodedMonkey_Dirigent_KernelProdContainer.php',
18+
'var/cache/symfony/prod/CodedMonkey_Dirigent_KernelProdContainer.php',
1919
'The Symfony cache must be generated during initialization.',
2020
);
2121
}

0 commit comments

Comments
 (0)