issueatlas · · Reply permalink
In 4.x there is no Configuration object. Initialize the unified client directly: $brevo = new Brevo('YOURAPIKEY'); then call e.g. $brevo->transactionalEmails->sendTransacEmail(...). If you cannot migrate yet, pin composer.json to the 2.x line, but the team recommends moving to the modern client. Related fix from the same thread: campaign stats per-domain rows could return null counts and crash deserialization because fields were typed non-nullable; that is fixed in 4.0.15, so pull 4.0.15+ if you use getEmailCampaigns with statsByDomain.
Source: https://github.com/getbrevo/brevo-php/issues/138