Conversation
src/Types is written by the private lettermint/sdk-generator (emit php, naming profile next, spec 80d8ab2a2d). composer generate regenerates it; composer generate:check verifies it, or only the headers when the generator is not available (CI).
… tokens One client, new Lettermint(sendingToken: ..., teamToken: ...) or new Lettermint($token), replaces Lettermint::email(), Lettermint::api() and the cached $lettermint->email builder. - emails->send(array, idempotencyKey:), emails->sendBatch() and an immutable emails->compose() builder; no message state on the client. - Each part uses its own token and never falls back to the other. - Typed exceptions under Lettermint\Exceptions, all extending LettermintException; ApiException::getCode() is the HTTP status. - Redirects are never followed, the timeout covers the whole request, no retries; empty and HTML responses raise UnexpectedResponseException. - Tokens and webhook secrets are held in SensitiveParameterValue, token parameters are #[\SensitiveParameter], debug output is redacted and the objects cannot be serialized. - The base URL path is kept, and empty, "." and ".." ids are rejected. - Generated response classes (Lettermint\Types) with open enums, typed CursorPage lists and iterate() helpers; typed array shapes for requests. - Webhook::verify(rawBody, headers) requires both signature headers and returns a WebhookPayload; failures carry a reason code. - PHPStan level 10; the Laravel-only dev dependencies are dropped. BREAKING CHANGE: see UPGRADE.md for every changed call.
The spec at lettermint/lettermint@0b4ecbdd23 (main, the #2582 merge) is identical to the previous pin; only the generated file headers change.
Windows runners check out files with CRLF, so the header check split on \n left a trailing \r.
bjarn
enabled auto-merge (squash)
October 4, 2026 10:52
Bjornftw
approved these changes
Oct 4, 2026
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
A new major version, following the Lettermint SDK design agreed for all languages. The reference is the Node.js SDK 3.0 (lettermint/lettermint-node#36). Sending holds no state on the client, types are generated from the published API spec, and every SDK passes the same conformance suite.
What changes
sendingTokenand/orteamToken. A single token string is detected by prefix:lm_team_is a team token,lm_plus letters and digits is a sending token, and anything else is a config error. Each part uses its own token and never falls back to the other.emails.send(message, options),emails.sendBatch(…)and an immutable per-messagecompose()builder. The idempotency key is a per-call option. Attachments are objects.0b4ecbdd23) using its names. Enums are open, so new API values never break decoding.verify(rawBody, headers)requires bothX-Lettermint-SignatureandX-Lettermint-Delivery, accepts any matchingv1, uses a ±300 s tolerance, and keys the HMAC on the secret as-is. Reason codes are the same in every SDK.Specific to this SDK
new Lettermint(sendingToken: …, teamToken: …);$lettermint->emails->send([...], idempotencyKey: …); immutablecompose().\Exceptionwith code 0.var_dumpand stack traces; they now use#[\SensitiveParameter]and redaction.lettermint/lettermint-laravel3.0 depends on this release (feat!: Lettermint Laravel 3.0 lettermint-laravel#45).Verification
--strict. 2.8.0 fails 11.Release
Tag
3.0.0(unprefixed, as before) before releasing Laravel 3.0, which requires^3.0.Docs for all SDK majors: lettermint/lettermint#2594 (stacked on lettermint/lettermint#2590). Merge it after the releases.
🤖 Generated with Claude Code