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

[6.x] Update error message if redis extension is not loaded #30673

Merged
merged 2 commits into from
Nov 25, 2019
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: 5 additions & 3 deletions src/Illuminate/Redis/Connectors/PhpRedisConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ protected function createClient(array $config)
{
return tap(new Redis, function ($client) use ($config) {
if ($client instanceof RedisFacade) {
throw new LogicException(
'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.'
);
$message = 'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.';
if (! extension_loaded('redis')) {
$message = 'Please make sure the PHP Redis extension is installed and enabled.';
}
throw new LogicException($message);
}

$this->establishConnection($client, $config);
Expand Down