Skip to content

Commit 0426df2

Browse files
authored
Fix adding multiple bootstrap providers with opcache (#50665)
1 parent a743d59 commit 0426df2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Support/ServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,10 @@ public static function addProviderToBootstrapFile(string $provider, string $path
493493
return false;
494494
}
495495

496+
if (function_exists('opcache_invalidate')) {
497+
opcache_invalidate($path, true);
498+
}
499+
496500
$providers = collect(require $path)
497501
->merge([$provider])
498502
->unique()

0 commit comments

Comments
 (0)