From 6f80b2fe6adb115778758df8eab8d0e4842de1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 12 Jan 2022 17:17:47 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- kiri-annotation/Loader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kiri-annotation/Loader.php b/kiri-annotation/Loader.php index 15da0f38..ae26f2f5 100644 --- a/kiri-annotation/Loader.php +++ b/kiri-annotation/Loader.php @@ -6,8 +6,8 @@ namespace Kiri\Annotation; use DirectoryIterator; use Exception; -use Kiri\Abstracts\Component; use Kiri; +use Kiri\Abstracts\Component; use ReflectionClass; use ReflectionException; use Throwable; @@ -84,6 +84,9 @@ class Loader extends Component public function _scanDir(DirectoryIterator $paths, $namespace, array $exclude = []) { foreach ($paths as $path) { + if (function_exists('opcache_invalidate')) { + opcache_invalidate($path->getRealPath(), true); + } if ($path->isDot() || str_starts_with($path->getFilename(), '.')) { continue; }