Why does the Twilio SDK not recognize a V2010 object as a child of Twilio\Version?

Viewed 25

I rarely and randomly get the following error when sending a message with the Twilio PHP SDK. The error message doesn't make sense to me, because V2010 objects do extend the Twilio\Version abstract class.

TypeError Twilio\InstanceContext::__construct(): Argument #1 ($version) must be of type Twilio\Version, Twilio\Rest\Api\V2010 given, called in /var/task/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountContext.php on line 119

Here are the relevant files from the SDK:

AccountContext.php

V2010.php

0 Answers
Related