-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hello,
I just migrated my project from gomoob/php-pushwoosh,
What I did was basically removing the old library from composer.json and then I added the new one.
Everything works Except something in this file:
src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php
public function jsonSerialize(): mixed
{
$json = [];
isset($this->apnsTrimContent) ? $json['apns_trim_content'] = intval($this->apnsTrimContent) : false;
isset($this->badges) ? $json['ios_badges'] = $this->badges : false;
isset($this->categoryId) ? $json['ios_category_id'] = $this->categoryId : false;
isset($this->rootParams) ? $json['ios_root_params'] = $this->rootParams : false;
isset($this->sound) ? $json['ios_sound'] = $this->sound : false;
isset($this->ttl) ? $json['ios_ttl'] = $this->ttl : false;
isset($this->trimContent) ? $json['ios_trim_content'] = intval($this->trimContent) : false;
if ($this->threadId !== null) { // <--- EXCEPTION ----------
$json['ios_thread_id'] = $this->threadId;
}
return $json;
}
Exception:
"Typed property Gomoob\Pushwoosh\Model\Notification\IOS::$threadId must not be accessed before initialization", line 124
this is the contenct of my $json variable

two questions:
- Is it the proper way to migrate the one I described?
- Is this exception generated by the library OR by my code?
Thanks!
Versions:
PHP: 8.2.25
Library: 2.1.0
Metadata
Metadata
Assignees
Labels
No labels