Deprecation warnings from twilio SDK

Created on 6 July 2023, over 1 year ago
Updated 24 July 2023, over 1 year ago

Problem/Motivation

When sending messages on PHP 8.1, numerous deprecation warnings appear.

Steps to reproduce

1. Enable the module on PHP 8.1
2. send a test message

The following notices appear:

Deprecated function: Return type of Twilio\Values::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 7 of /var/www/html/vendor/twilio/sdk/src/Twilio/Values.php).
Deprecated function: Return type of Twilio\Values::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 7 of /var/www/html/vendor/twilio/sdk/src/Twilio/Values.php).
Deprecated function: Return type of Twilio\Values::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 7 of /var/www/html/vendor/twilio/sdk/src/Twilio/Values.php).
Deprecated function: Return type of Twilio\Values::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 7 of /var/www/html/vendor/twilio/sdk/src/Twilio/Values.php).

Proposed resolution

Consider updating the Twilio SDK - this was raised as https://github.com/twilio/twilio-php/issues/709 and fixed in https://github.com/twilio/twilio-php/issues/714, which was included in version 6.34.0 of the SDK.

The Drupal module currently references version ^5.13 of twilio/sdk.
The latest 5.x release was in 2020.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024