botman / botman/driver-twilio

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

Open
#10 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
12
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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? https://github.com/botman/driver-twilio/pull/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.

Contributor guide

Open the contributing guide

Research direction

Start with src/TwilioVoiceDriver.php at the failing line and compare the driver with the Twilio SDK version installed by the documented instructions. Review pull request #9 for the referenced compatibility context, then exercise the simple $this->say('Welcome!') voice conversation. Done means a default installation can initiate that conversation without the Twilio\Twiml class error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.