Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

The Swoole adapter was using socket_strerror() for error messages, requiring the ext-sockets extension unnecessarily.

Changes

  • Replace socket_strerror($errorCode) with $client->errMsg in Swoole adapter error handling
  • Use Swoole's native error reporting instead of socket extension functions
// Before
if (!$success) {
    $errorCode = $client->errCode;
    $errorMsg = socket_strerror($errorCode);  // Requires ext-sockets
    $this->closeClient($host, $port, $ssl);
    throw new Exception("Request failed: {$errorMsg} (Code: {$errorCode})");
}

// After
if (!$success) {
    $errorCode = $client->errCode;
    $errorMsg = $client->errMsg;  // Uses Swoole's built-in error message
    $this->closeClient($host, $port, $ssl);
    throw new Exception("Request failed: {$errorMsg} (Code: {$errorCode})");
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor Author

Copilot AI commented Jan 19, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/laravel/pint/zipball/c67b4195b75491e4dfc6b00b1c78b68d86f54c90
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/xQJRJn /usr/bin/composer install (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/xQJRJn /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/xQJRJn /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/xQJRJn /usr/bin/composer install (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/xQJRJn /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add cURL and Swoole adapters for HTTP requests Remove ext-sockets dependency from Swoole adapter error handling Jan 19, 2026
Copilot AI requested a review from abnegate January 19, 2026 06:27
@abnegate abnegate marked this pull request as ready for review January 19, 2026 06:29
@abnegate abnegate merged commit ae9cc01 into feat-adapters Jan 19, 2026
1 check passed
@abnegate abnegate deleted the copilot/sub-pr-16 branch January 19, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants