Skip to content

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