Skip to content

docs: Add migration guides for v2 to v3 and v3 to v4 - #464

Merged
razor-x merged 8 commits into
betafrom
claude/php-migration-guides-0b4d92
Aug 14, 2026
Merged

docs: Add migration guides for v2 to v3 and v3 to v4#464
razor-x merged 8 commits into
betafrom
claude/php-migration-guides-0b4d92

Conversation

@razor-x

@razor-x razor-x commented Aug 14, 2026

Copy link
Copy Markdown
Member

Adds MIGRATION.md with upgrade guides for both major version bumps, modeled on the Python SDK's MIGRATION.md: each guide has a summary table of breaking changes, a section per change with before/after examples, the additions worth adopting during the migration, and a checklist.

v3 to v4

Covers the SDK unification as it stands on beta (v4.0.0-beta.5):

  • PHP 8.2 or later is required.
  • Seam\Seam replaces Seam\SeamClient, with named constructor options and no $throw_http_errors.
  • $seam->client is the configured Guzzle client; Seam::request(), $seam->api_key, and the global LTS_VERSION constant are removed.
  • The retry policy (two retries, idempotent methods only) and the 30-second timeout.
  • wait_for_action_attempt replaces poll_until_ready, with defaults moving from 20 s/0.4 s to 10 s/1 s.
  • Nested resource classes move to sub-namespaces (DevicePropertiesDevice\Properties), including the class-name-collision fix.
  • Missing required parameters fail locally instead of after a server round trip.
  • Preferred HTTP methods and the URL search params standard, and their interaction with retries.
  • Error handling and pagination refinements.
  • New in v4: personal access tokens, SeamWithoutWorkspace, environment variables, SeamWebhook, and NullValue::NULL.

v2 to v3

Covers the blueprint regeneration, including changes that landed in 3.x minors:

  • $seam->events->get() and $seam->acs->users->get() reorder their first parameter, silently breaking positional callers.
  • Resource classes move to Seam\Resources (3.3.0) and route clients to Seam\Routes (3.5.0).
  • ActionAttempt->result is typed, dropping the fields the spec defines no type for.
  • Resource constructors are alphabetical and uniformly nullable.
  • Classes for undocumented resources are no longer generated.

The README's "Upgrading from 3.x" section is removed: it duplicated the guide, and migration content lives in MIGRATION.md.

Install instructions reference stable ^4/^3 rather than prereleases, matching seamapi/python#615 and its follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP

Comment thread src/Http/ClientFactory.php Outdated
Comment thread tests/HeadersTest.php Outdated
Comment thread tests/HeadersTest.php Outdated
claude and others added 7 commits August 14, 2026 14:58
Model the guide on the Python SDK's MIGRATION.md: each major version
gets a summary table of breaking changes, a section per change with
before/after examples, the additions worth adopting during the
migration, and a checklist.

The v3 to v4 guide covers the SDK unification: the Seam\Seam client
with named options, the Guzzle client as the public client, the retry
policy and 30-second timeout, wait_for_action_attempt replacing
poll_until_ready, the namespaced nested resource classes, local
enforcement of required parameters, preferred HTTP methods with the
URL search params standard, and the error handling and pagination
refinements. The v2 to v3 guide covers the blueprint regeneration:
the two reordered get methods, the Seam\Resources and Seam\Routes
namespaces, the typed action attempt result, the alphabetical
nullable resource constructors, and the removed undocumented
resource classes.

The README's Upgrading from 3.x section links to the full guide.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP
The Upgrading from 3.x section duplicated MIGRATION.md, which covers
everything it said. Readers upgrading will find the migration guide.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP
Every Seam SDK sends seam-sdk-name and seam-sdk-version to identify
itself; only this one also rewrote User-Agent, silently discarding a
caller's own value and giving no way to override it. Drop the header
from sdk_headers() so a caller-set User-Agent (via guzzle_options) or
the underlying HTTP library's default passes through untouched.

Also drops the migration guide's now-inaccurate note on the removed
SEAM_API_URL environment variable, and updates the User-Agent section
to describe the corrected behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP
Drop Seam\Seam::LTS_VERSION, Seam\SeamWithoutWorkspace::LTS_VERSION,
Seam\Http\ClientFactory::LTS_VERSION, and the seam-lts-version request
header, with no replacement. The other Seam SDKs (Python) carry no
equivalent.

Update the codegen template so a future generate keeps the constant
out of src/Seam.php, and update the migration guide to describe the
removal instead of pointing at Seam::LTS_VERSION.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP
@razor-x
razor-x force-pushed the claude/php-migration-guides-0b4d92 branch from 7ded7c5 to 3925ca8 Compare August 14, 2026 21:58
Removing the SEAM_API_URL env var left the return statement without
its semicolon, so src/Options.php did not parse. Every job failed on
it: Lint at the syntax pass, Test and Install with a ParseError as
soon as the class autoloaded, and Format and Generate when prettier
could not parse the file.

Return the lookup directly rather than by way of a variable that is
now only used once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRhzZ42JiS7LGUynykjQXP
@razor-x
razor-x merged commit 1cde5df into beta Aug 14, 2026
15 checks passed
@razor-x
razor-x deleted the claude/php-migration-guides-0b4d92 branch August 14, 2026 22:06
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