Skip to content

Update Twilio SDK to v8

John Twyman requested to merge jtwyman/twilio:spike/sdk into master

Description

This MR updates the Twilio PHP SDK used by the extension from version 5 to version 8. I've reviewed the Twilio SDK upgrade documentation and see nothing that gives me pause. Version 6 dropped support for older versions of PHP: 5.5, 5.6, 7.0, and 7.1, which are already unsupported by CiviCRM.

A motivation for the MR is that SDK v5 generates deprecation warnings against PHP 8.1.

Details

I've downloaded the Twilio PHP SDK code, and placed its contents into the extension's Services/Twilio directory, replacing all files there. This does increase the size of the extension by about 8MB. No other changes have been made.

Testing

I've deployed the updated extension to two CiviCRM environments: one which had the previous version installed, and a fresh installation.

In both cases I have tested sending

  • a SMS message to a single contact (Action > Outbound SMS from the contact Summary screen); and
  • a mass SMS to a group of contacts

I've also tested the use of API parameters to set an alphanumeric sender ID (eg. "From: John").

In all tests SMS messages were correctly sent/received. I also tailed ConfigAndLog, php-fpm and Drupal log streams and didn't see any obvious deprecation warnings or similar.

Merge request reports

Loading