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

Incompatible with endroid/qr-code > 5.0.0 #114

Closed
Mattie112 opened this issue Nov 10, 2023 · 6 comments
Closed

Incompatible with endroid/qr-code > 5.0.0 #114

Mattie112 opened this issue Nov 10, 2023 · 6 comments

Comments

@Mattie112
Copy link
Contributor

When using this project with endroid/qr-code version 5.0.2 I get the following error:

Exception {"message":"Class \"Endroid\\QrCode\\ErrorCorrectionLevel\\ErrorCorrectionLevelHigh\" not found"} 
            $qr_provider = new EndroidQrCodeProvider();
            $tfa = new TwoFactorAuth(issuer: "xx", qrcodeprovider: $qr_provider);
            $qr = $tfa->getQRCodeImageAsDataUri("uid", $secret);

With version 4.8.5 it works just fine.

@willpower232
Copy link
Collaborator

I guess this line doesn't work for version 5 then?

$this->endroid4 = method_exists(QrCode::class, 'create');

Definitely open to PRs on this one.

@Mattie112
Copy link
Contributor Author

I will try to see if that is the only problem and then create a PR for this! if it is more work I dont have time right now and I will report back.

@Mattie112
Copy link
Contributor Author

This should fix it: #115

Don't currently have the time to test it with other versions then 4 and 5.

willpower232 added a commit that referenced this issue Nov 14, 2023
Fix issue #114 (Support for EndroidQR v5)
@willpower232
Copy link
Collaborator

@Mattie112 thanks for the PR and the patience for me to sort it out, feel free to close if everything is working as intended for you now

@Mattie112
Copy link
Contributor Author

Thanks, I will update to the latest version and confirm that it works. Thans for adding the test/build config, did not notice that :)

@Mattie112
Copy link
Contributor Author

Yes, all seem to be working fine (with Endroid v5).

Great timing btw, I was just about to merge my internal MR but now I can set it back to this repo instead of my own fork :)

Thanks again!

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

No branches or pull requests

2 participants