File tree 1 file changed +9
-1
lines changed
src/Reflection/BetterReflection/SourceLocator
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 28
28
use function interface_exists ;
29
29
use function is_file ;
30
30
use function is_string ;
31
+ use function opcache_invalidate ;
31
32
use function restore_error_handler ;
32
33
use function set_error_handler ;
33
34
use function spl_autoload_functions ;
@@ -334,7 +335,7 @@ private function locateClassByName(string $className): ?array
334
335
335
336
try {
336
337
/** @var array{string, string, null}|null */
337
- return FileReadTrapStreamWrapper::withStreamWrapperOverride (
338
+ $ result = FileReadTrapStreamWrapper::withStreamWrapperOverride (
338
339
static function () use ($ className ): ?array {
339
340
$ functions = spl_autoload_functions ();
340
341
if ($ functions === false ) {
@@ -358,6 +359,13 @@ static function () use ($className): ?array {
358
359
return null ;
359
360
},
360
361
);
362
+ if ($ result === null ) {
363
+ return null ;
364
+ }
365
+
366
+ opcache_invalidate ($ result [0 ], true );
367
+
368
+ return $ result ;
361
369
} finally {
362
370
restore_error_handler ();
363
371
}
You can’t perform that action at this time.
0 commit comments