edamov / pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key)
MIT License
368 stars 119 forks source link

Add return types to jsonSerialize() to be compatible with JsonSerializable::jsonSerialize() #156

Closed knyjoh closed 1 year ago

knyjoh commented 1 year ago

This will get rid of deprecation notices like:

Return type of Pushok\Payload::jsonSerialize()  
should either be compatible with JsonSerializable::jsonSerialize(): mixed, 
or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

while still following the type that's already specified in the phpdoc block.