thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server
https://oauth2.thephpleague.com
MIT License
6.51k stars 1.12k forks source link

Test against php 8.1 #1251

Closed sergiy-petrov closed 1 year ago

iansltx commented 2 years ago

I'm seeing a deprecation error due to a missing return type on jsonSerialize() in ScopeTrait. Based on that trait's contents, we should be able to safely add the return typehint of string but it would be enforcing something that's only docblock'd at the moment so I figured I'd ask before just pushing a PR. For now the workaround in our codebase is to implement jsonSerialize() on our own in our scope entity rather than using the trait, which works for now in both 8.0 and 8.1.

tobias-trozowski commented 2 years ago

@iansltx shouldn't it be ok if we just add #[\ReturnTypeWillChange] to the ScopeTrait::jsonSerialize()?

iansltx commented 2 years ago

That would remove the warning, but we'll still need to change the return type eventually. Guessing we want to wait for another major version to do that since it's not enforced now?

Sephster commented 2 years ago

I aim to take a look at this before the Christmas hols are over. Thanks for all your input guys and Merry Christmas

Sephster commented 2 years ago

Just to update here, I'm working on a release for version 9 which will fully support PHP 8.1. I would have loved to push this out the door asap but I think it is right I take time to release a proper major version.

NSURLSession0 commented 2 years ago

Just to update here, I'm working on a release for version 9 which will fully support PHP 8.1. I would have loved to push this out the door asap but I think it is right I take time to release a proper major version.

First of all, thank you very much for this great library. I’m wondering whether version 9 (or another version with PHP 8.1 support) is still expected to be released. If not, it might be a idea to merge this PR?

Sephster commented 1 year ago

Just realised this PR is still open but PHP 8.1 and 8.2 support has now been properly added with corresponding tests. Will close this accordingly. Many thanks