Skip to content

Conversation

ericdowell
Copy link
Contributor

Based on #29864 I would say it is time for better error messages than what has always been provided (pre-6.x).

After spending around 30 minutes to an hour figuring out that the PHP Redis extension was installed but not enabled I found myself displeased with the unhelpful default error message. To help all future developers we should be detecting if redis extension is not loaded and then provide a more helpful message.

Given the class PhpRedisConnector is only used for the phpredis driver, no checks other than !extension_loaded('redis') is needed.

Tested on machine without extension loaded:

forge@solitary-thunder:~$ php -a
Interactive mode enabled

php > var_dump(extension_loaded('redis'));
bool(false)
php >

and one with the extension loaded:

forge@fathomless-breeze:~$ php -a
Interactive mode enabled

php > var_dump(extension_loaded('redis'));
bool(true)
php >

@taylorotwell taylorotwell merged commit b28acda into laravel:6.x Nov 25, 2019
@ericdowell ericdowell deleted the php-redis-extension-exception branch November 28, 2019 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants