From 1c24147dc8dd82332ed95043d1457eeb2b74f2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20Nork=C5=ABnas?= Date: Thu, 11 Dec 2025 15:23:10 +0200 Subject: [PATCH] Fix `kernel.share_dir` --- tests/Functional/CustomTestKernel.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Functional/CustomTestKernel.php b/tests/Functional/CustomTestKernel.php index d0d391b..523d04e 100644 --- a/tests/Functional/CustomTestKernel.php +++ b/tests/Functional/CustomTestKernel.php @@ -45,6 +45,11 @@ public function getCacheDir(): string return realpath(sys_get_temp_dir()).'/NyholmBundleTest/cachePluginInteractionTest'; } + public function getShareDir(): ?string + { + return $this->getCacheDir(); + } + /** * Returns the kernel parameters. */ @@ -77,8 +82,7 @@ protected function getKernelParameters(): array 'kernel.bundles_metadata' => $bundlesMetadata, 'kernel.charset' => $this->getCharset(), 'kernel.container_class' => $this->getContainerClass(), - 'kernel.share_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(), - ]; + ] + (null !== ($dir = $this->getShareDir()) ? ['kernel.share_dir' => realpath($dir) ?: $dir] : []); } /**