pushok
pushok copied to clipboard
PHP 8.1 compatablity
Add return type to jsonSerialize call in payload to satisfy PHP 8.1 interfaces enforcement
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.
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".
Please note that the 'mixed' keyword added in this PR is not compatible with PHP <8.0
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 Thanks! It was merged
@edamov I think this PR can be closed now.