From a53d12674cb334df0cc8c84f456d67e53e3add15 Mon Sep 17 00:00:00 2001 From: Catalin Dan Date: Tue, 12 May 2020 20:28:51 +0300 Subject: [PATCH] bug #36793 [DI][Preload] Use require_once instead of require when appending cache warmer-returned files to preload file. --- src/Symfony/Component/DependencyInjection/Dumper/Preloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php b/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php index 7d4c42c46c..c2c805861b 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php @@ -27,7 +27,7 @@ final class Preloader foreach ($list as $item) { if (0 === strpos($item, $cacheDir)) { - file_put_contents($file, sprintf("require __DIR__.%s;\n", var_export(substr($item, \strlen($cacheDir)), true)), FILE_APPEND); + file_put_contents($file, sprintf("require_once __DIR__.%s;\n", var_export(substr($item, \strlen($cacheDir)), true)), FILE_APPEND); continue; }