Skip to content

Commit

Permalink
Remove services.php and packages.php in /bootstrap/cache/ when cleari…
Browse files Browse the repository at this point in the history
…ng cache - closes #4536
  • Loading branch information
freescout-help-desk committed Jan 31, 2025
1 parent 589ac69 commit cb0e560
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/Console/Commands/ClearCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public function handle()
{
$this->call('clear-compiled');
$this->call('cache:clear');

// Remove files from /bootstrap/cache folder.
// https://github.com/freescout-help-desk/freescout/issues/4536
$files = new \Illuminate\Filesystem\Filesystem;
$files->delete($this->laravel->getCachedServicesPath());
$files->delete($this->laravel->getCachedPackagesPath());

$this->call('view:clear');
if ($this->option('doNotCacheConfig')) {
$this->call('config:clear');
Expand Down
3 changes: 3 additions & 0 deletions tools/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ printf "\nClearing cache:\n"
# First clear cache manually to avoid such issues:
# https://github.com/freescout-help-desk/freescout/issues/4366
rm -f $PROJECT_ROOT/bootstrap/cache/config.php
# https://github.com/freescout-help-desk/freescout/issues/4536#issuecomment-2626860295
rm -f $PROJECT_ROOT/bootstrap/cache/services.php
rm -f $PROJECT_ROOT/bootstrap/cache/packages.php
rm -rf $PROJECT_ROOT/storage/framework/cache/data/*
rm -f $PROJECT_ROOT/storage/framework/views/*
rm -f $PROJECT_ROOT/storage/framework/sessions/*
Expand Down

0 comments on commit cb0e560

Please sign in to comment.