Vonage / vonage-php-code-snippets

PHP code examples for using Vonage APIs
MIT License
29 stars 55 forks source link

php version requirement #72

Closed AbrahamNobleOX closed 2 years ago

AbrahamNobleOX commented 2 years ago

When I try to use send_sms.php it brings this error: Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.3.7. in /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/composer/platform_check.php on line 24

and

When I specify my php version to be 7.3.7 which I am running it returns this error, whats the problem??

Fatal error: Uncaught Vonage\Client\Exception\Request: Non White-listed Destination - rejected in /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/vonage/client-core/src/SMS/ExceptionErrorHandler.php:70 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/vonage/client-core/src/Client/APIResource.php(286): Vonage\SMS\ExceptionErrorHandler->__invoke(Object(GuzzleHttp\Psr7\Response), Object(Laminas\Diactoros\Request)) #1 /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/vonage/client-core/src/Client/APIResource.php(128): Vonage\Client\APIResource->getException(Object(GuzzleHttp\Psr7\Response), Object(Laminas\Diactoros\Request)) #2 /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/vonage/client-core/src/SMS/Client.php(47): Vonage\Client\APIResource->create(Array, '/sms/json') #3 /Applications/XAMPP/xamppfiles/htdocs/vonagesms/sms/send-sms.php(10): Vonage\SMS\Client->send(Object(Vonage\SMS\Message\SMS)) #4 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/vonagesms/vendor/vonage/client-core/src/SMS/ExceptionErrorHandler.php on line 70

SecondeJK commented 2 years ago

This is telling you that you need to be using PHP8 for the set of requirements in your project. So you need to upgrade your PHP project to match it.