From 9a110266af91d1afe1718698a90466657c9ee2f6 Mon Sep 17 00:00:00 2001 From: Florian Le Goff Date: Sun, 30 Jun 2024 14:12:03 +0200 Subject: [PATCH] Fix trying to open non-existant manifest file --- DependencyInjection/Compiler/AssetsVersionCompilerPass.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DependencyInjection/Compiler/AssetsVersionCompilerPass.php b/DependencyInjection/Compiler/AssetsVersionCompilerPass.php index c783c67b..31774979 100644 --- a/DependencyInjection/Compiler/AssetsVersionCompilerPass.php +++ b/DependencyInjection/Compiler/AssetsVersionCompilerPass.php @@ -68,6 +68,11 @@ public function process(ContainerBuilder $container): void $runtimeDefinition->setArgument(1, $version); if (is_a($versionStrategyDefinition->getClass(), JsonManifestVersionStrategy::class, true)) { + if (!file_exists($version)) { + $this->log($container, 'The manifest file at "'.$version.'" does not yet exist'); + + return; + } $jsonManifestString = file_get_contents($version); if (!\is_string($jsonManifestString)) {