Skip to content

fix(php): use interface_exists instead of class_exists for GuzzleHttp\ClientInterface#16006

Merged
Swimburger merged 6 commits into
mainfrom
devin/1779281886-fix-php-class-exists-interface
May 20, 2026
Merged

fix(php): use interface_exists instead of class_exists for GuzzleHttp\ClientInterface#16006
Swimburger merged 6 commits into
mainfrom
devin/1779281886-fix-php-class-exists-interface

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented May 20, 2026

Description

Linear ticket: Refs https://linear.app/buildwithfern/issue/FER-10673/

class_exists('GuzzleHttp\ClientInterface') always returns false because ClientInterface is an interface, not a class. This meant the Guzzle timeout path in RetryDecoratingClient was never reached, causing users to see:

User Warning: Timeout option is not supported for the current PSR-18 client (GuzzleHttp\Client). Use Guzzle or Symfony HttpClient for timeout support.

Changes Made

  • Changed class_existsinterface_exists for GuzzleHttp\ClientInterface in RetryDecoratingClient.Template.php
  • Added 3 unit tests to RawClientTest.Template.php:
    • testInterfaceExistsDetectsGuzzle — confirms interface_exists detects Guzzle when installed
    • testTimeoutForwardsToGuzzleSend — verifies timeout is forwarded via Guzzle's send() with ['timeout' => 5.0]
    • testNoTimeoutDoesNotCallGuzzleSend — verifies sendRequest() is used (not send()) when timeout is null
  • Regenerated all 143 seed PHP SDK fixtures
  • Added unreleased changelog entry
  • Updated README.md generator (if applicable) — N/A

Testing

  • Unit tests added/updated
  • Manual testing completed
  • All 3 new tests pass locally via php vendor/bin/phpunit in seed/php-sdk/exhaustive/wire-tests (38 tests, 118 assertions)
  • phpstan passes cleanly
  • All 15/15 php-sdk CI shards that include my changes pass
  • The 1 failing shard (api-wide-base-path-with-default) is a pre-existing phpstan error from PR chore(seed): update all seed snapshots #15999

Link to Devin session: https://app.devin.ai/sessions/d14585aa60304ee79757b9dc229aaa8d

…\ClientInterface

Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
@devin-ai-integration devin-ai-integration Bot requested a review from amckinney as a code owner May 20, 2026 12:58
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

SDK Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-05-20T05:20:23Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
php-sdk square 54s (n=5) 81s (n=5) 52s -2s (-3.7%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-05-20T05:20:23Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-05-20 18:51 UTC

devin-ai-integration Bot and others added 4 commits May 20, 2026 14:49
…atingClient

Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
…icts with static $warned flag)

Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
@Swimburger Swimburger enabled auto-merge (squash) May 20, 2026 17:01
@Swimburger Swimburger disabled auto-merge May 20, 2026 17:19
@Swimburger Swimburger merged commit 15d2dec into main May 20, 2026
57 checks passed
@Swimburger Swimburger deleted the devin/1779281886-fix-php-class-exists-interface branch May 20, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant