-
Notifications
You must be signed in to change notification settings - Fork 61
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
List php extensions #329
List php extensions #329
Conversation
19d4b3e
to
7baa682
Compare
7baa682
to
883b825
Compare
Sorry did some mistake, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
* @return string as csv list of loaded extensions | ||
*/ | ||
protected function getLoadedPhpExtensions(): string { | ||
$extensions = (function_exists('get_loaded_extensions') ? get_loaded_extensions() : ['Unable to list extensions']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getLoadedPhpExtensions
should probably return the list of extensions directly and fallback to null
if the function doesn't exist, and we would do the implode
part inside the template.
This would allow this function to be reusable elsewhere and the 'Unable to list extensions'
message being translatable without injecting I10N into this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds cleaner to me, too. Shall i implement this task as separate PR? Or anyone else interested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please open a new PR. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at #367
In many situations it's good to know which php extensions are enabled in the current setup. Usually one would look this up in
phpinfo
page but this one is not included in NC, so i thought it would be nice to add this info to the serverinfo page?