Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

PHP 8 Support? #66

Closed
pmxjason opened this issue Feb 10, 2021 · 14 comments
Closed

PHP 8 Support? #66

pmxjason opened this issue Feb 10, 2021 · 14 comments

Comments

@pmxjason
Copy link

Hello,

Is adding PHP8 support to this library on the roadmap? Lack of support is going to become a blocker on a number of our projects.

Any indication of when this can be expected would be much appreciated.

@laura-rodriguez
Copy link

Hi @pmxjason,

Thank you for your question. I'll ask internally and give you an update when I have more details.

@bretterer
Copy link
Collaborator

Hi @pmxjason, We have not currently done any compatibility work on adding PHP8 support for this repository. From a very high level review, it seems that there are only some packages that will need to be updated in order to allow for PHP8 to be used. Have you done any testing yourself to see if this will work out of the box? What findings have you found that are a blocker for your team so we can make sure to address them?

@pmxjason
Copy link
Author

@bretterer I agree that it doesn't look like there is much work to make a PHP8 compatible version. My team hasn't spent any time attempting to update the package. We would still be blocked without an official version as our internal security review forbids homebrew/modified security and authentication libraries.

I might misunderstand. I thought our business was sold Okta in part due to the ease of integration into .net / php applications. I will feed it back up the chain to see if I have permission to invest time in this.

@bretterer
Copy link
Collaborator

@pmxjason I'm sorry if it came across as us not doing the work. I was honestly just curious if you had done any on your end to help unblock you.

Please watch this ticket for updates soon on steps we will be taking to update this package as well as our management sdk for PHP8 support.

  • Brian

@pmxjason
Copy link
Author

I may have misinterpreted your response. I got blocked on something else and had a quick attempt to get something running.

I forked the code base and made the following single change to the composer.json file.

"php": "^7.2|^8.0",

I then pulled in my forked repo and ran:

$jwtVerifier = (new \Okta\JwtVerifier\JwtVerifierBuilder())
    ->setAdaptor(new \Okta\JwtVerifier\Adaptors\FirebasePhpJwt())
    ->setAudience('api://default')
    ->setClientId('0oaerwa0pccy7Kb4N416')
    ->setIssuer('https://iris.okta.com/oauth2/default')
    ->build();
try {
    $jwt = $jwtVerifier->verify($token);
} catch (\Exception $e) {
    var_dump($e);
}

This ran fine without error. Valid tokens worked, invalid tokens through an exception. I haven't run the tests.

@bretterer
Copy link
Collaborator

@pmxjason Thank you for the information here. I will talk with our team to figure out when we can get this on our schedule to update.

@duylaurent-tran
Copy link

Do you have any news when it will be compatible with version 8 of PHP?

@lerayflorian
Copy link

Hi,
Given the delay, I'd say Okta isn't able to cope with pace of modern softwares. It still asks me to be on php 7.2... (while 7.3 dates back to December 2018!!!). I'll thus probably be forced to drop Okta. May this post be some good piece of advice for people assessing Okta's relevance to their needs.
Florian

@ctrl-f5
Copy link
Contributor

ctrl-f5 commented Jul 30, 2021

Can this be prioritized please? PHP8.1 is around the corner, 7.2 which is the min version currently in the package is already end of life.

And it seems like the code is basically compatible with 8, it just needs to be tested on that version and composer versions need to be aligned...

@ctrl-f5
Copy link
Contributor

ctrl-f5 commented Aug 2, 2021

I have created an MR to add 8.0 and drop 7.2. I suggest tagging this as 2.0 and if people still want to use 7.2 they can still use the 1.x branch.

@vkhramtsov
Copy link

vkhramtsov commented Aug 10, 2021

Any news here? @laura-rodriguez ? @bretterer ?

@vkhramtsov
Copy link

@laura-rodriguez @bretterer php 8.0 was out 8 months ago, php 7.3 will reach EOL in 3 mohths, php 7.4 will be moved to security fixes only state in 3 moths. Do we have any chance to get version of package compatible with php 8.0? Currently this is only package that prevent us from upgrade to php 8.0. Should we wait for update or it is beter to look for to another jwt verifier package?
Thank you in advance.

@vkhramtsov
Copy link

@bretterer thank you for merging php 8 support to develop. Would you be so kind to create new release?
Thank you in advance.

@vkhramtsov
Copy link

@bretterer Thank you for creating release.
@pmxjason looks like you can close this ticket.

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

No branches or pull requests

7 participants