php-qrcode
php-qrcode copied to clipboard
PHP 8.4 deprecation of implicit nullable
Running QRCode against PHP 8.4.0alpha1 gives a number of E_DEPRECATED error messages, eg
E_DEPRECATED in C:\inetpub\wwwroot\abcd\lib\chillerlan\QRCode\QRCode.php at line 80
chillerlan\QRCode\QRCode::render(): Implicitly marking parameter $data as nullable is deprecated, the explicit nullable type must be used instead
Hey, I am aware of this issue (https://wiki.php.net/rfc/deprecate-implicitly-nullable-types). PHP 8.4 is a couple more months down the road, implicit nullables will be fixed until then.
OK, thanks.
Just as a heads-up, this is what currently happens when I enable PHP 8.4 on CI: https://github.com/chillerlan/php-settings-container/actions/runs/9947535033/job/27480365765 (spoiler: countless warnings from dev-dependencies)
@campbell-m I've pushed a fix to address this issue to the v4 and v5 as well as dev-main (upcoming v6) branches. Can you perhaps check if this resolves the issue for you?
The composer tags are:
dev-main#f65d9d2815b4362fde0cac18205ca7b711692a8cf65d9d2815b4362fde0cac18205ca7b711692a8cv5.0.x-dev#beecbe7ba5f4776bd8bd7e69d84d0c7dc8a94983beecbe7ba5f4776bd8bd7e69d84d0c7dc8a94983v4.3.x-dev#f6c4da9ce405b5a7815c8d882b3d85c5514f6f1df6c4da9ce405b5a7815c8d882b3d85c5514f6f1d
Many thanks. That seems to fix the issues.
I'm going to reopen this as this is probably not done yet. It's still not possible to run tests on CI under PHP 8.4 as dependencies will cause trouble.
PHP 8.4 GA release is next week - if anything explodes in the meantime it's not my fault... 🤞