LexikJWTAuthenticationBundle icon indicating copy to clipboard operation
LexikJWTAuthenticationBundle copied to clipboard

feat: 3.x migrate to "lcobucci/jwt" v5

Open Chris53897 opened this issue 1 year ago • 8 comments

feat: add support for psr/clock

To be honest i do not have much knowledge about this topic.

I just followed this mirgration guide https://lcobucci-jwt.readthedocs.io/en/latest/upgrading/ V5 does use psr/clock, instead of v4 with there own clock implementation.

As this is a new major version, i see no need to support versions <5

I added this PR for 3.x Branch as well. But could be a seperate PR if you want to. https://github.com/lexik/LexikJWTAuthenticationBundle/pull/1155

Chris53897 avatar Sep 04 '23 09:09 Chris53897

First run failed because of missing psr/clock implementation. I just added this to the dev section and let the users decide, which to use. I am not sure for runtime checks if the users to not have an implementation installed.

PHP 8.2 failed because of https://github.com/lexik/LexikJWTAuthenticationBundle/issues/1152 PHP 8.3 fails because lcobucci/jwt does not allow PHP 8.3 at the moment.

Chris53897 avatar Sep 04 '23 09:09 Chris53897

Can the fix from https://github.com/lexik/LexikJWTAuthenticationBundle/pull/1119/files or 2.x merged upstream for 3.x?

Chris53897 avatar Sep 04 '23 10:09 Chris53897

I just noticed that @maxhelias used an different approach for 2.x https://github.com/lexik/LexikJWTAuthenticationBundle/pull/1125

Chris53897 avatar Sep 04 '23 10:09 Chris53897

Hi @Chris53897, 2.x should be merge on 3.x to correct compatibility

maxhelias avatar Sep 04 '23 12:09 maxhelias

After that is done, we could discuss what are the best options.

  • Keep support of version 3 and 4?
  • Use jwt/clock as hard requirement or let the user decide which implementation of psr/clock the use?

Chris53897 avatar Sep 04 '23 15:09 Chris53897

@Chris53897 Thanks for the PR, I'm gonna review and merge soon. I'd plan to finish and release v3.0 somewhere around 2024' first quarter. Also I'd like to backport this to the 2.x branch with backward compatiblity layers for the older versions of lcobucci/jwt that 2.x supports today. If you feel brave enough to do so, additional PR welcome :)

chalasr avatar Nov 30 '23 15:11 chalasr

Thanks. The chance for additional PRs for the tasks is not so high. My actual main focus is on PRs to support symfony 7 and php 8.3 for repos.

Chris53897 avatar Nov 30 '23 15:11 Chris53897

That's fine, thanks for telling me.

chalasr avatar Nov 30 '23 15:11 chalasr