-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Allow disabling xdebug for CLI SAPI on Debian/Ubuntu. #54
Conversation
Sweet... I'm not an expert at Ansible configuration but this looks good to me! |
If anyone wants to test this on a live DrupalVM-based project, here's a patch you can apply against DrupalVM via composer: I've implemented it and it works great, and does seem to boost CLI performance about 30%. |
I get around this issue by running all CLI commands on the host (with xdebug disabled) which is faster again. |
@@ -17,3 +17,5 @@ php_xdebug_idekey: sublime.xdebug | |||
|
|||
php_xdebug_max_nesting_level: 256 | |||
|
|||
# Only used on Debian/Ubuntu. | |||
php_xdebug_cli_disable: no |
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.
I might be willing to add this in Debian/Ubuntu-specific without something similar for Red Hat/etc... but I want to try to make it an equitable option for CentOS users at least. If nobody else can take a crack at it, I will soon, I just don't have the time tonight.
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.
I don't understand how this would be possible on CentOS without substantial changes to how PHP is invoked.
I've never worked with CentOS before, but after a brief investigation it appears that PHP config files can't distinguish between different execution contexts (CLI vs FPM) like they can on Ubuntu. Instead, you'd have to pass a unique CLI-specific configuration file as an argument to php
, which seems like a pretty big change just to support this one use case.
A brief Google seems to confirm this: https://gagor.pl/2014/05/changing-default-php-ini-file-for-php-cli-on-centos/
This is pretty hard to work around downstream, so I'd love to get this merged. Maybe we can open a follow up issue to support additional OSes if it's not going to be quick/easy? |
Merged! It's probably not feasible to try to get it working on RHEL derivatives in a similar fashion. |
@geerlingguy came to the same conclusion here -- geerlingguy/ansible-role-php#140 (comment) Only looked at the default config but there might be a package which adds support for separate config per SAPI. |
Fixes #53