Skip to content

docs(readme): align with v5 SDK surface#131

Merged
mourraille merged 1 commit into
v5from
fix/readme-v5
May 15, 2026
Merged

docs(readme): align with v5 SDK surface#131
mourraille merged 1 commit into
v5from
fix/readme-v5

Conversation

@mourraille

Copy link
Copy Markdown
Collaborator

Summary

Aligns the v5 branch README with the actual v5 SDK surface and the published v5.0.0 release notes.

Why the banner wasn't rendering

The README referenced `https://raw.githubusercontent.com/getbrevo/brevo-node/v4/banner.png\` — that's the node repo on a v4 branch that no longer exists (the node repo branches are now `main`, `v6`, and `v3-(legacy)`). Switched to the in-repo `banner.png` (which is present at the repo root).

Other fixes

  • Add 'Upgrading from v4.x' section reflecting actual v5 breaking changes (filter rename, `createBatchEvents` payload wrap, balance/CRM/model changes, type tightening) — mirrors the structure used on `brevo-node@v6` (PR CVE-2022-31042 Detail #88).
  • Fix v1.x migration callout — recommendation now points to v5.x, and the migration example is renamed accordingly.
  • Fix Custom Client example — `apiKey` is a required constructor parameter; the previous snippet (`new Brevo(options: [...])` without `apiKey`) was invalid PHP.
  • Correct the Timeouts section — the SDK does not default to 30s; with no `timeout` option set, the underlying HTTP client's default applies (Guzzle defaults to no timeout). Adds a note about Guzzle/Symfony forwarding.
  • Add a Logging section — the SDK has no built-in logger, but exposes the `client` option for a PSR-18 HTTP client. Shows how to wire any PSR-3 logger via Guzzle's `Middleware::log`, with a redaction warning for the `api-key` header.

Test plan

  • Render the README on the v5 branch and confirm the banner image now displays.
  • Verify code snippets compile against the v5 SDK surface (constructor signature, option names).

🤖 Generated with Claude Code

- Fix broken banner image (was pointing to a non-existent `brevo-node@v4/banner.png`); use the `banner.png` in this repo.
- Add an "Upgrading from v4.x" section reflecting the actual v5 breaking changes (filters rename, `createBatchEvents` payload wrap, balance/CRM/model changes, type tightening).
- Update v1.x migration callout to recommend v5.x and rename the example accordingly.
- Fix Custom Client example — `apiKey` is required, the previous snippet was invalid PHP.
- Correct the Timeouts section — the SDK does not default to 30s; it inherits the HTTP client's default. Clarify Guzzle/Symfony forwarding.
- Add a Logging section explaining how to plug in any PSR-3 logger via Guzzle's `Middleware::log`, with an `api-key` redaction warning.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@mourraille mourraille merged commit fd93d9d into v5 May 15, 2026
4 checks passed
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.

1 participant