packagist getbrevo/brevo-php 5.0.1
v5.0.1 - Empty Object Serialization Fix

5 hours ago

PHP SDK v5.0.1

What's New

🔧 Bug Fix: Empty Object Serialization

  • Fix: JsonSerializableType now correctly serializes empty objects to {} instead of []
  • Resolves backend validation errors when sending empty optional/nested objects

✨ New Features: Consent Groups Management

  • List consent groups — GET /contacts/consent-groups
  • Create a consent group — POST /contacts/consent-groups
  • Get consent group details — GET /contacts/consent-groups/{id}
  • Update consent group — PUT /contacts/consent-groups/{id} (name, description, signup mode)
  • Delete consent group — DELETE /contacts/consent-groups/{id}

📲 Extended Operations

  • Import contacts — POST /contacts/import now accepts optional consentGroupIds field to add imported contacts to specified consent groups
  • Get contact details — GET /contacts/{identifier} now returns consentGroups array showing subscription status (when feature enabled)

💳 New Wallet Feature

  • Get pass installation URL — GET /wallet/passes/{passId}/installUrl/{contactId}
    • Generates per-contact wallet installation URLs
    • Enables sharing via email, SMS, or QR code for Apple Wallet/Google Wallet integration

Bug Fixes

  • Fixed serialization of empty JsonSerializableType instances at the top level
  • Fixed serialization of empty nested objects within parent objects
  • Resolves backend validation failures from strict type checkers

Compatibility

  • ✅ Backward compatible — no breaking changes
  • ✅ No method removals or signature changes
  • ✅ Public API unchanged

Installation

composer require getbrevo/brevo-php:^5.0.1

Don't miss a new brevo-php release

NewReleases is sending notifications on new releases.