diff --git a/_config/migration.yml b/_config/migration.yml index 0e290c3e..e4f1461d 100644 --- a/_config/migration.yml +++ b/_config/migration.yml @@ -1,11 +1,11 @@ --- Name: file-migration --- -# Remove the HTTPOutputHandler from the logger on the file migration. +# Remove the ErrorOutputHandler from the logger on the file migration. # It logs a lot of >= NOTICE errors that pollute the output with backtrace. SilverStripe\Core\Injector\Injector: Psr\Log\LoggerInterface.quiet: type: singleton class: Monolog\Logger constructor: - - "file-migration" \ No newline at end of file + - "file-migration" diff --git a/src/Dev/Tasks/InterventionBackendCacheFlushTask.php b/src/Dev/Tasks/InterventionBackendCacheFlushTask.php index edbc67d9..426c72d4 100644 --- a/src/Dev/Tasks/InterventionBackendCacheFlushTask.php +++ b/src/Dev/Tasks/InterventionBackendCacheFlushTask.php @@ -4,27 +4,25 @@ use SilverStripe\Assets\InterventionBackend; use SilverStripe\Dev\BuildTask; +use SilverStripe\HybridExecution\HybridOutput; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; /** * A task to manually flush InterventionBackend cache */ class InterventionBackendCacheFlushTask extends BuildTask { - private static $segment = 'InterventionBackendCacheFlushTask'; + protected static string $commandName = 'InterventionBackendCacheFlushTask'; - protected $title = 'Clear InterventionBackend cache'; + protected string $title = 'Clear InterventionBackend cache'; - protected $description = "Clears caches for InterventionBackend"; + protected static string $description = 'Clears caches for InterventionBackend'; - /** - * @param \SilverStripe\Control\HTTPRequest $request - * @throws \ReflectionException - */ - public function run($request) + protected function execute(InputInterface $input, HybridOutput $output): int { $class = new InterventionBackend(); $class->getCache()->clear(); - - echo 'DONE'; + return Command::SUCCESS; } }