signalwire-community / signalwire-php

PHP Library for SignalWire APIs
https://signalwire-community.github.io/docs/php/
MIT License
22 stars 26 forks source link

updating twilio/sdk to 6.10.4 / client declarations #112

Closed natural411 closed 4 years ago

bryanrite commented 4 years ago

@natural411 Looks like CI is failing on this, can you check that out please and ty!

ShashiKumar-SignalWire commented 4 years ago

@bryanrite Below example from docs https://docs.signalwire.com/topics/laml-xml/?php#voice-laml-say-notes-on-usage is not working

<?
use SignalWire\LaML;

$response = new VoiceResponse();
$start = $response->start();
$stream = $start->stream(['url' => 'wss://your-application.com/audiostream']);
$stream->parameter(['name' => 'FirstName', 'value' => 'Jane']);
$stream->parameter(['name' => 'LastName', 'value' => 'Doe']);

echo $response;

?>

with error

PHP Fatal error:  Uncaught Error: Class 'VoiceResponse' not found in /root/signalwire_php/new_version/laml_generate.php:303
Stack trace:
#0 {main}
  thrown in /root/signalwire_php/new_version/laml_generate.php on line 303

Also adding a test case file which having all PHP docs examples codes, please run and if you stuck at any line just search with that example in the docs page to get that example LaMLGenerator.php.txt