-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
convert issuer to string prevents php 8.1 errors #83
Conversation
By forcing $this->issuer to be string, even if null is set, it prevents throwing errors in PHP 8.1 is `rawurlencode` is not allowed to have null as parameter. It would be better to force string to be already in `__construct`, but this may create a breaking change for existing users.
Thanks for this, can you add 8.1 to the list of checked versions here and see if there are any other problems reported by tests? TwoFactorAuth/.github/workflows/test.yml Line 13 in 042f347
|
Hi, i would like to but unfortunately i don't have time to setup a test environment anytime soon. |
I've just approved running github actions here so if you add that then github actions will do all the testing publicly |
Github can't reproduce the original issue in master, are you able to share the code you used to trigger the problem? |
For sure
|
See https://github.com/MasterOdin/TwoFactorAuth/commit/66687ba1729125792085543fe7a62801bcf55cad (and failing PHP 8.1 action) which adds a new test case that demonstrates the bug. This also required setting php.ini value as part of setup-php action as for PHP 8.0+, it uses a production php.ini file that sets |
thanks for confirming @MasterOdin, are you able to PR that extra check into this repo as well? |
The testcase should probably be included into this PR by @brainfoolong as it fails otherwise. I can make a PR though with the change to setup-php and phpunit.xml configuration. |
By forcing $this->issuer to be string, even if null is set, it prevents throwing errors in PHP 8.1 is
rawurlencode
is not allowed to have null as parameter.It would be better to force string to be already in
__construct
, but this may create a breaking change for existing users.