From be66f43d52114a3c38bf8270f58a7141c7a80ebf Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 11 Dec 2013 16:12:11 +0100 Subject: [PATCH] invalidate opcache of extensions.php file in composer installer fixes #1480 --- extensions/yii/composer/Installer.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/yii/composer/Installer.php b/extensions/yii/composer/Installer.php index d8d799f..6f69afc 100644 --- a/extensions/yii/composer/Installer.php +++ b/extensions/yii/composer/Installer.php @@ -135,6 +135,10 @@ class Installer extends LibraryInstaller if (!is_file($file)) { return []; } + // invalidate opcache of extensions.php if exists + if (function_exists('opcache_invalidate')) { + opcache_invalidate($file, true); + } $extensions = require($file); $vendorDir = str_replace('\\', '/', $this->vendorDir); @@ -159,6 +163,10 @@ class Installer extends LibraryInstaller $file = $this->vendorDir . '/' . self::EXTENSION_FILE; $array = str_replace("'", '$vendorDir . \'', var_export($extensions, true)); file_put_contents($file, "