Skip to content

Commit

Permalink
Fix adding multiple bootstrap providers with opcache (#50665)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher authored Mar 20, 2024
1 parent a743d59 commit 0426df2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Support/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -493,6 +493,10 @@ public static function addProviderToBootstrapFile(string $provider, string $path
return false;
}

if (function_exists('opcache_invalidate')) {
opcache_invalidate($path, true);
}

$providers = collect(require $path)
->merge([$provider])
->unique()

0 comments on commit 0426df2

Please sign in to comment.