From b1290da21bf0aec570e7852ebcdd032ff86a5074 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 4 Oct 2017 11:26:14 +0200 Subject: [PATCH] [Config] Fix dumped files invalidation by OPCache --- src/Symfony/Component/Config/ConfigCache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Config/ConfigCache.php b/src/Symfony/Component/Config/ConfigCache.php index a34328ee8f31..814ae7fb3b46 100644 --- a/src/Symfony/Component/Config/ConfigCache.php +++ b/src/Symfony/Component/Config/ConfigCache.php @@ -149,6 +149,10 @@ public function write($content, array $metadata = null) // discard chmod failure (some filesystem may not support it) } } + + if (\function_exists('opcache_invalidate') && ini_get('opcache.enable')) { + @opcache_invalidate($this->file, true); + } } /**