Add --curl-debug option for verbose HTTP debugging #2746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new global
--curl-debugCLI option that enables verbose cURL output to help troubleshoot TLS and connection issues.Problem
Customers sometimes receive "Connection refused" errors from Terminus when TLS is not working correctly. Common causes include:
Currently, customers get minimal error information and often submit bug reports or contact support about perceived service outages when the issue is actually on their local system.
Solution
This PR adds a
--curl-debugoption that enables Guzzle's debug mode, which leverages cURL'sCURLOPT_VERBOSEoption to provide detailed HTTP transaction information including:Usage
Example Output
When enabled, users see detailed connection information:
Test Plan
--curl-debugoption appears in help outputImplementation Details
src/Terminus.phpsrc/Request/Request.phpto check for the optiondebug => trueparameter which activates cURL verbose mode