File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/Reflection/BetterReflection/SourceLocator Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2828use function interface_exists ;
2929use function is_file ;
3030use function is_string ;
31+ use function opcache_invalidate ;
3132use function restore_error_handler ;
3233use function set_error_handler ;
3334use function spl_autoload_functions ;
@@ -334,7 +335,7 @@ private function locateClassByName(string $className): ?array
334335
335336 try {
336337 /** @var array{string, string, null}|null */
337- return FileReadTrapStreamWrapper::withStreamWrapperOverride (
338+ $ result = FileReadTrapStreamWrapper::withStreamWrapperOverride (
338339 static function () use ($ className ): ?array {
339340 $ functions = spl_autoload_functions ();
340341 if ($ functions === false ) {
@@ -358,6 +359,13 @@ static function () use ($className): ?array {
358359 return null ;
359360 },
360361 );
362+ if ($ result === null ) {
363+ return null ;
364+ }
365+
366+ opcache_invalidate ($ result [0 ], true );
367+
368+ return $ result ;
361369 } finally {
362370 restore_error_handler ();
363371 }
You can’t perform that action at this time.
0 commit comments