pushok icon indicating copy to clipboard operation
pushok copied to clipboard

PHP 8.1 compatablity

Open srjlewis opened this issue 3 years ago • 3 comments

Add return type to jsonSerialize call in payload to satisfy PHP 8.1 interfaces enforcement

srjlewis avatar Jan 17 '22 16:01 srjlewis

You actually need a lot more changes that what is above to support PHP 8.1 :) I forked the master branch and made a bunch of changes and now it supports 8.1, rather than submitting a huge PR. I also architecturally changed it by removing a lot of reliance for the JWT libs and make the JWT on the fly.

dutchie027 avatar Apr 09 '22 03:04 dutchie027

This fix has worked for me. Thank you! I had to upgrade also the dependency "fgrosse/phpasn1", required from "web-token/jwt-core" from original "^2.0" to "^2.4".

fbett avatar Aug 10 '22 13:08 fbett

Please note that the 'mixed' keyword added in this PR is not compatible with PHP <8.0

mobielbekeken-thijs avatar Sep 20 '22 12:09 mobielbekeken-thijs

I've added another PR: https://github.com/edamov/pushok/pull/156 which uses 'array' instead of the 'mixed' keyword.

It's already documented to be an array and thus should be more correct, and also has the benefit of being backwards compatible.

knyjoh avatar Jan 05 '23 12:01 knyjoh

@knyjoh Thanks! It was merged

edamov avatar Jan 06 '23 10:01 edamov

@edamov I think this PR can be closed now.

stollr avatar Feb 06 '23 08:02 stollr