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

PHP 8.4 deprecation of implicit nullable #276

Closed
campbell-m opened this issue Jul 15, 2024 · 7 comments
Closed

PHP 8.4 deprecation of implicit nullable #276

campbell-m opened this issue Jul 15, 2024 · 7 comments
Labels
PHP deprecation Something in PHP was marked as deprecated (link RFC or release)

Comments

@campbell-m
Copy link

campbell-m commented Jul 15, 2024

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
@codemasher
Copy link
Member

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.

@campbell-m
Copy link
Author

OK, thanks.

@codemasher codemasher changed the title Support for PHP 8.4 PHP 8.4 deprecation of implicit nullable Jul 15, 2024
@codemasher codemasher added PHP deprecation Something in PHP was marked as deprecated (link RFC or release) and removed enhancement labels Jul 15, 2024
@codemasher
Copy link
Member

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)

@codemasher
Copy link
Member

@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#f65d9d2815b4362fde0cac18205ca7b711692a8c f65d9d2
  • v5.0.x-dev#beecbe7ba5f4776bd8bd7e69d84d0c7dc8a94983 beecbe7
  • v4.3.x-dev#f6c4da9ce405b5a7815c8d882b3d85c5514f6f1d f6c4da9

@campbell-m
Copy link
Author

Many thanks. That seems to fix the issues.

@codemasher
Copy link
Member

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.

@codemasher
Copy link
Member

PHP 8.4 GA release is next week - if anything explodes in the meantime it's not my fault... 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP deprecation Something in PHP was marked as deprecated (link RFC or release)
Projects
None yet
Development

No branches or pull requests

2 participants