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

Remove implicit null params #394

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Remove implicit null params #394

merged 3 commits into from
Jan 8, 2025

Conversation

lizkenyon
Copy link
Contributor

WHY are these changes introduced?

Fixes #391

  • To support PHP 8.4 we need to explicitly set params a nullable.

e.g.

-function test(string $test = null) {}
+function test(?string $test = null) {}

 test('PHP'); // Allowed
 test(null); // Allowed

This was tested by linking the local library, and verifying the deprecation notice is removed.

WHAT is this pull request doing?

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have updated the documentation for public APIs from the library (if applicable)

@DjThossi
Copy link

DjThossi commented Jan 8, 2025

Yes please. Looking forward to this PR being merged and tagged.

@lizkenyon lizkenyon merged commit 01da173 into main Jan 8, 2025
7 checks passed
@lizkenyon lizkenyon deleted the liz/remove-implicit-null branch January 8, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8.4 deprecation: Implicitly nullable parameter declarations is deprecated
3 participants