laravel / vonage-notification-channel

Vonage Notification Channel for Laravel.
https://laravel.com/docs/notifications#sms-notifications
MIT License
744 stars 51 forks source link

Error accessing the response data in the event listener #80

Closed bhojkapderas closed 1 year ago

bhojkapderas commented 1 year ago

Vonage Notification Channel Version

2.5.1

Laravel Version

8.83.27

PHP Version

7.4

Database Driver & Version

No response

Description

Having trouble accessing the response data from the event listener.

Steps To Reproduce

public function handle(NotificationSent $event)

$event->response returns the class Vonage\Message\Message

So i figure i can get the data this way:

Running $event->response->getResponseData() i am getting this error

fseek() expects parameter 1 to be resource, int given {"exception":"[object] (ErrorException(code: 0): fseek() expects parameter 1 to be resource, int given at /home/vagrant/code/project/vendor/guzzlehttp/psr7/src/Stream.php:206)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 /home/vagrant/code/project/vendor/guzzlehttp/psr7/src/Stream.php(206): fseek()
#2 /home/vagrant/code/project/vendor/guzzlehttp/psr7/src/Stream.php(193): GuzzleHttp\\Psr7\\Stream->seek()

Is this a bug or is there a correct way to access the response data?

"laravel/framework": "^8.0", "laravel/nexmo-notification-channel": "^2.5.1",

driesvints commented 1 year ago

Hey there,

Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.

Thanks!