Add --curl-debug option for verbose HTTP debugging#2746
Open
namespacebrian wants to merge 1 commit into
Open
Conversation
This commit adds a new global --curl-debug CLI option that enables verbose cURL output to help troubleshoot TLS and connection issues. When --curl-debug is specified, detailed HTTP transaction information is displayed including: - Connection establishment details - TLS handshake information - HTTP headers and progress - Transfer details This is particularly useful for diagnosing customer issues related to: - Misconfigured CA certificates - Incorrect system clocks causing TLS validation failures - Network connectivity problems - Certificate verification errors The implementation leverages Guzzle's built-in debug functionality which uses cURL's CURLOPT_VERBOSE option under the hood.
kaylimepy
approved these changes
Nov 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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