pushok
pushok copied to clipboard
Deprecation notices with PHP 8.1
refs: https://github.com/edamov/pushok/pull/146
# php -v
PHP 8.1.3 (cli) (built: Feb 16 2022 01:00:24) (NTS gcc x86_64)
notice: Deprecated (8192): 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
in [/edamov/pushok/src/Payload.php, line 429]
grep jsonSerialize -R .
/edamov/pushok/src/Payload.php: public function jsonSerialize()
/edamov/pushok/src/Payload/Alert.php: public function jsonSerialize()
/edamov/pushok/src/Payload/Sound.php: public function jsonSerialize()
hello,
im having the same problem but it is still working.
If you could be able to remove the warning message, it would be nice, thanks.
Deprecated: Return type of Pushok\Payload::jsonSerialize() should either be comp
atible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
If you want the notifications gone, you can clone my fork: https://github.com/dutchie027/apnpush
This is fixed by https://github.com/edamov/pushok/pull/156. Just update to a version >= 0.14.3
;-)
@edamov I think you can close this issue