TheNetworg / oauth2-azure

Azure AD provider for the OAuth 2.0 Client.
https://packagist.org/packages/thenetworg/oauth2-azure
MIT License
230 stars 108 forks source link

Remove Deprecations for PHP 8.1 / ditch PHP 5.6 and 7.0 #155

Closed spackmat closed 2 years ago

spackmat commented 2 years ago

Removes the deprecation notices raised by PHP 8.1.

And ditch very end of life PHP versions 5.6 and 7.0 to support the missing return types that raised the deprecation notices in PHP 8.1.

Also fixes a small bug inside Azure::checkResponse() that was found by the static code analysis.

See #154

Kaaly commented 2 years ago

Some news on this PR ?

spackmat commented 2 years ago

BTW: I wrote a comment in getResourceOwnerDetailsUrl that only returns an empty string. I wonder, if that method should return an URL instead? But I am not that deep inside the library to decide, if this is really a bug or was implemented on purpose.

curry684 commented 2 years ago

Might as well bump firebase/php-jwt to ^6.0 while at it.

spackmat commented 2 years ago

I had a quick look into https://github.com/firebase/php-jwt/releases/tag/v6.0.0 and at least the first breaking change affects the usage in this package, which makes further code changes necessary:

The second argument of JWT::decode now must be Firebase\JWT\Key or array<string, Firebase\JWT\Key>

So I think a switch to firebase/php-jwt 6.0 and the changes and tests needed for that should get their own PR.

@hajekj What do you think? From my perspective, this PR here is a simple one that could be easily accepted, then bumping php-jwt to its current version can be done afterwards.