fix: don't report the xdebug module by default - #108
Conversation
a900e61 to
1324875
Compare
|
@claude review |
|
Claude finished @carlos-granados's task in 3m 1s —— View job Claude Code Review
Reviewed the four commits against What looks good
Suggestions (nits, non‑blocking)
Testing noteThe "temporarily drop tests to isolate Windows CI failure" commit was followed by re‑adding them in VerdictLGTM. No correctness issues found; the items above are polish, not blockers. |
969d90e to
796130a
Compare
There was a problem hiding this comment.
Pull request overview
This PR makes reporting the xdebug module name (i.e., extension_loaded("xdebug")) optional and off by default, to avoid ecosystem tools (e.g., Composer/PHPUnit) detecting “xdebug” and attempting to disable it via restart/unload logic that doesn’t apply to this project.
Changes:
- Added
xdebug.report_xdebug_module/php_debugger.report_xdebug_module(default0) to control whether anxdebugmodule alias is registered. - Adjusted MINIT ordering so
php_debugger.*INI aliases are registered before deciding whether to create thexdebugalias (so the alias works when configured viaphp_debugger.report_xdebug_module=1). - Updated tests, docs, CI/workflows, and Docker smoke checks to key off
php_debuggerby default.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| xdebug.c | Adds the INI toggle and makes xdebug module alias registration conditional (default off). |
| src/lib/lib.h | Introduces the report_xdebug_module settings flag in library settings. |
| src/lib/log.c | Updates settings display lookup to use the real module name php_debugger (works even when xdebug alias is disabled). |
| tests/base/report_xdebug_module-001.phpt | Verifies extension_loaded("xdebug") is false by default and INI defaults are 0. |
| tests/base/report_xdebug_module-002.phpt | Verifies enabling via xdebug.report_xdebug_module=1 re-enables the xdebug alias. |
| tests/base/report_xdebug_module-003.phpt | Verifies enabling via php_debugger.report_xdebug_module=1 also re-enables the xdebug alias. |
| run-xdebug-tests.php | Ensures test runner special-casing applies whether the module appears as xdebug or php_debugger. |
| README.md | Documents the new default behavior and how to re-enable extension_loaded("xdebug"). |
| docker/Dockerfile.debian | Updates smoke checks to assert php_debugger is present instead of xdebug. |
| docker/Dockerfile.alpine | Updates smoke checks to assert php_debugger is present instead of xdebug. |
| .github/workflows/static-build.yml | Removes assumptions that xdebug is present in module list / extension_loaded. |
| .github/workflows/release.yml | Removes xdebug module presence assertions; keeps function-level compatibility checks. |
| .github/workflows/docker.yml | Updates container smoke checks to assert php_debugger is present instead of xdebug. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
796130a to
8fe4ecc
Compare
8fe4ecc to
32e2fa2
Compare
We had configured PHP debugger so that it would report the XDebug module as installed, in theory to provide better compatibility, but this turned out to be counterproductive: tools like composer or phpunit detect it, try to disable it and they can't because it's not actually loaded, and end up reporting that it's enabled and making things slow, which we don't want.
This PR makes reporting that XDebug is loaded optional, defaulting to reporting that it's not loaded