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

Replace deprecated implicitly nullable parameters with explicit null union type #163

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

J-Ben87
Copy link
Contributor

@J-Ben87 J-Ben87 commented Feb 25, 2025

PHP 8.4 has deprecated implicitly nullable parameter types.
https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

All implicitly nullable parameters, must now have the explicit |null union type instead.

-function bar(int $x = null) {
+function bar(int|null $x = null) {
}

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.73%. Comparing base (a39460b) to head (be40dfe).
Report is 1 commits behind head on 0.x.

Additional details and impacted files
@@            Coverage Diff            @@
##                0.x     #163   +/-   ##
=========================================
  Coverage     99.73%   99.73%           
  Complexity      925      925           
=========================================
  Files           154      154           
  Lines          2974     2974           
=========================================
  Hits           2966     2966           
  Misses            8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yann-eugone yann-eugone changed the title Make sure nullable arguments are strongly typed with null type Replace deprecated implicitly nullable parameters with explicit null union type Feb 25, 2025
@yann-eugone yann-eugone merged commit eae4e09 into 0.x Feb 25, 2025
11 checks passed
@yann-eugone yann-eugone deleted the nullable-arguments branch February 25, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment