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

add assertion to check if an extension is loaded. #201

Merged
merged 2 commits into from
Jan 4, 2017
Merged

add assertion to check if an extension is loaded. #201

merged 2 commits into from
Jan 4, 2017

Conversation

abacaphiliac
Copy link
Contributor

i could use such an assertion in factory code to generate a helpful message about which extension to install rather than letting PHP fail with a missing class error:

22:18 $ /usr/local/Cellar/php71/7.1.0_11/bin/php -r "new \Memcached;"
PHP Fatal error:  Uncaught Error: Class 'Memcached' not found in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

Fatal error: Uncaught Error: Class 'Memcached' not found in Command line code on line 1

Error: Class 'Memcached' not found in Command line code on line 1

Call Stack:
    0.0001     346408   1. {main}() Command line code:0

@rquadling rquadling merged commit d400505 into beberlei:master Jan 4, 2017
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