Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kamilHipsz opened this issue Jun 29, 2022 · 6 comments
Labels

Comments

@kamilHipsz
Copy link

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

@hajekj hajekj added the bug label Jun 29, 2022
@hajekj
Copy link
Member

hajekj commented Jun 29, 2022

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

@kamilHipsz
Copy link
Author

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"?

@tomasfejfar
Copy link

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.

@tomasfejfar
Copy link

So 2.0.1 is the latest version supporting v4 of JWT.

@tomasfejfar
Copy link

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

@yehudahkay
Copy link

I had to require firebase separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants