Closed francislavoie closed 3 years ago
Ohhh - I think it's actually because gd
doesn't return resources anymore in PHP 8, but objects now.
Hi @francislavoie this should be fixed.
Hey!
In what version is this fixed? Because I'm using 3.9.6 (which seems to be the latest one), and I can still see this errors.
Also, If I check the source code inside my vendor folder, it's still doing this is_resource
calls.
Am I missing something? 🤔
Hi @acelaya this should be fixed in the 3.x branch and awaiting update of an external library before it completely supports PHP 8 and can be tagged.
Perfect. Thanks for the info.
@endroid Can we help for something to tag a new release?
@ThibaudDauce unfortunately I think not :) I hope to have a 4.x release soon which allows usage of the library without requiring that package but for now if you need to run in PHP 8 you can use the temporary workaround mentioned in https://github.com/endroid/qr-code/issues/292.
See https://github.com/Vectorface/GoogleAuthenticator/pull/2
You can see the test failures here: https://github.com/Vectorface/GoogleAuthenticator/pull/2/checks?check_run_id=1484500680
FYI the dependency of this lib that is causing failures in your builds is now fixed to support PHP 8: https://github.com/khanamiryan/php-qrcode-detector-decoder/issues/98 with this release: https://github.com/khanamiryan/php-qrcode-detector-decoder/releases/tag/1.0.4
I'm not sure why GD would be failing on PHP 8. This lib doesn't emit any useful information as to why it might be the case. It definitely gets past the check for the extension being loaded, but then it fails on
imagecreatetruecolor()
https://github.com/endroid/qr-code/blob/ad1aa6ca3abbbfe5ac072029d6f9bda7aafd957f/src/Writer/PngWriter.php#L71-L75