Skip to content

Commit

Permalink
Remove Elasticsearch installer requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
stevethitchman committed Nov 16, 2020
1 parent 181a387 commit 5338f75
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
15 changes: 0 additions & 15 deletions src/Console/Commands/InstallGetCandyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,6 @@ public function handle(Dispatcher $events, GetCandyInstaller $installer)

exit(1);
}

$elasticsearch = $event->response['elasticsearch'];

if (! $elasticsearch['connected']) {
$this->error('Unable to connect to elasticsearh');
$this->warn('Did you remember to configure the connection in config/getcandy.php?');

exit(1);
}

if (! $elasticsearch['success']) {
$this->error("GetCandy requires Elasticsearch version 6.8(.x). You're running version {$elasticsearch['version']}");

exit(1);
}
});

// Run the installer...
Expand Down
16 changes: 0 additions & 16 deletions src/Installer/Runners/PreflightRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ public function run()
$dbVersion = null;
}

try {
$elastica = new Client(config('getcandy.search.client_config.elastic'));
$result = $elastica->request('/');
$esVersion = $result->getData()['version']['number'];
} catch (HttpException $e) {
$esVersion = null;
}

event(new PreflightCompletedEvent([
'api' => [
'version' => $apiVersion,
Expand All @@ -44,14 +36,6 @@ public function run()
'connected' => $dbVersion ?? false,
'success' => (bool) $dbVersion,
],
'elasticsearch' => [
'version' => $esVersion,
'connected' => $esVersion ?? false,
'success' => $esVersion !== null
&& version_compare($esVersion, '6.9', '<')
&& version_compare($esVersion, '6.8', '>='),

],
]));

return $this;
Expand Down

0 comments on commit 5338f75

Please sign in to comment.