Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bisect should use CacheClearCommand in core instead #4023

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
}
}
Loading