Skip to content

Commit

Permalink
chore: Bisect should use CacheClearCommand in core instead (#4023)
Browse files Browse the repository at this point in the history
  • Loading branch information
datlechin authored Sep 25, 2024
1 parent 3f4b159 commit e08a9f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions framework/core/src/Extension/Bisect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Flarum\Extension;

use Closure;
use Composer\Command\ClearCacheCommand;
use Flarum\Foundation\Console\CacheClearCommand;
use Flarum\Settings\SettingsRepositoryInterface;
use RuntimeException;
use Symfony\Component\Console\Input\ArrayInput;
Expand All @@ -32,7 +32,7 @@ class Bisect
public function __construct(
protected ExtensionManager $extensions,
protected SettingsRepositoryInterface $settings,
protected ClearCacheCommand $clearCache,
protected CacheClearCommand $cacheClear,
) {
$this->state = BisectState::continueOrStart(
$ids = $this->extensions->getEnabled(),
Expand Down Expand Up @@ -139,12 +139,12 @@ public function end(): void
$this->settings->set('extensions_enabled', json_encode($this->state->ids));
$this->settings->set('maintenance_mode', 'none');
$this->state->end();
$this->clearCache->run(new ArrayInput([]), new NullOutput());
$this->cacheClear->run(new ArrayInput([]), new NullOutput());
}

protected function rotateExtensions(array $enabled): void
{
$this->settings->set('extensions_enabled', json_encode($enabled));
$this->clearCache->run(new ArrayInput([]), new NullOutput());
$this->cacheClear->run(new ArrayInput([]), new NullOutput());
}
}

0 comments on commit e08a9f6

Please sign in to comment.