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

Conversation

@ericdowell
Copy link
Contributor

ericdowell commented Nov 24, 2019

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 >
ericdowell added 2 commits Nov 24, 2019
@taylorotwell taylorotwell merged commit b28acda into laravel:6.x Nov 25, 2019
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ericdowell ericdowell deleted the ericdowell:php-redis-extension-exception branch Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.