botman / driver-twilio

BotMan Twilio Driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default install results in "Class 'Twilio\Twiml' not found" errors

ceejayoz opened this issue · comments

I have a brand-new Botman installation.

Installing the Twilio driver via the instructions at https://botman.io/2.0/driver-twilio and doing a simple:

$this->say('Welcome!');

in a test conversation initiated via:

$botman->on(TwilioVoiceDriver::INCOMING_CALL, function($payload, $bot) {
    $bot->startConversation(new Conversations\SupportRequest);
});

results in the following error:

Class 'Twilio\Twiml' not found {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Class 'Twilio\Twiml' not found at /Users/ceejayoz/Multibrain/phonetree/vendor/botman/driver-twilio/src/TwilioVoiceDriver.php:123

It appears the driver code does not function with the Twilio SDK version being required; it's code against an older SDK, perhaps v4? #9 appears to include the adjustments necessary (using Twilio\TwiML\VoiceResponse instead of Twilio\Twiml), but at this time, the driver doesn't appear to function as installed via Botman's docs.