pushok icon indicating copy to clipboard operation
pushok copied to clipboard

Deprecation notices with PHP 8.1

Open yodelx opened this issue 2 years ago • 2 comments

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()

yodelx avatar Apr 20 '22 04:04 yodelx

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 chrome_euoMBZdDFF atible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

oktaykalfa avatar Jun 08 '22 20:06 oktaykalfa

If you want the notifications gone, you can clone my fork: https://github.com/dutchie027/apnpush

dutchie027 avatar Jun 26 '22 20:06 dutchie027

This is fixed by https://github.com/edamov/pushok/pull/156. Just update to a version >= 0.14.3 ;-)

stollr avatar Feb 06 '23 08:02 stollr

@edamov I think you can close this issue

stollr avatar Feb 06 '23 08:02 stollr