TheNetworg/oauth2-azure

BC break in 2.1.1 - Attempted to load class "Key" from namespace "Firebase\JWT

kamilHipsz opened this issue · 6 comments

Hi,
#163 breaks compatibility with firebase/php-jwt versions earlier than 5.5.0. Firebase\JWT\Key class exists only in 5.5.0 and above and it conflicts with following composer dependencies:
"firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0"

Thanks,
Kamil

Do you think it would be okay to drop support for 3.0, 4.0. and <5.5 version of php-jwt package?

I think it should be fine. Maybe it's worth to revert #163 and release it as 2.1.2 and then, create a tag 2.2.0 with "firebase/php-jwt": "~5.5||~6.0"?

It's not only #163

This commit (in 2.1.0) added JWK e4f597e#diff-e71d1d223a40906fdb0c32e375c67398c6f658f4c95a71dad16b855004d91fa7R359
But such class was added in v5.2.0 firebase/php-jwt@b0def5f

I think such issues could be prevented by having a build that would check for highest and lowest dependencies and then run simple PHPStan with very low level that will resolve all the classes and make sure they exist and are compatible.

So 2.0.1 is the latest version supporting v4 of JWT.

I'll try to contribute Github Actions build that would catch this if I find the time.

I had to require firebase separately