mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
chore: Bisect should use CacheClearCommand
in core instead (#4023)
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
namespace Flarum\Extension;
|
namespace Flarum\Extension;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Composer\Command\ClearCacheCommand;
|
use Flarum\Foundation\Console\CacheClearCommand;
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
@@ -32,7 +32,7 @@ class Bisect
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
protected ExtensionManager $extensions,
|
protected ExtensionManager $extensions,
|
||||||
protected SettingsRepositoryInterface $settings,
|
protected SettingsRepositoryInterface $settings,
|
||||||
protected ClearCacheCommand $clearCache,
|
protected CacheClearCommand $cacheClear,
|
||||||
) {
|
) {
|
||||||
$this->state = BisectState::continueOrStart(
|
$this->state = BisectState::continueOrStart(
|
||||||
$ids = $this->extensions->getEnabled(),
|
$ids = $this->extensions->getEnabled(),
|
||||||
@@ -139,12 +139,12 @@ class Bisect
|
|||||||
$this->settings->set('extensions_enabled', json_encode($this->state->ids));
|
$this->settings->set('extensions_enabled', json_encode($this->state->ids));
|
||||||
$this->settings->set('maintenance_mode', 'none');
|
$this->settings->set('maintenance_mode', 'none');
|
||||||
$this->state->end();
|
$this->state->end();
|
||||||
$this->clearCache->run(new ArrayInput([]), new NullOutput());
|
$this->cacheClear->run(new ArrayInput([]), new NullOutput());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function rotateExtensions(array $enabled): void
|
protected function rotateExtensions(array $enabled): void
|
||||||
{
|
{
|
||||||
$this->settings->set('extensions_enabled', json_encode($enabled));
|
$this->settings->set('extensions_enabled', json_encode($enabled));
|
||||||
$this->clearCache->run(new ArrayInput([]), new NullOutput());
|
$this->cacheClear->run(new ArrayInput([]), new NullOutput());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user