Skip to content

Conversation

zigzagdev
Copy link

What’s been done

Just a quick tidy-up.
PHP 8.1 started warning about implicitly nullable parameters, and PHP 8.4 is going to make them a hard error.
So I’ve updated the function signatures to use ?type syntax explicitly.

Before:

public function example(string $name = null)

After:

 public function example(?string $name = null)

This keeps us ahead of future PHP upgrades and makes the intent a bit clearer.
Shouldn’t affect any actual logic — purely a syntax-level fix.

Let me know if anything needs tweaking!

@freekmurze freekmurze merged commit ee3c982 into spatie:main Aug 4, 2025
1 check passed
@freekmurze
Copy link
Member

Thanks!

@zigzagdev zigzagdev deleted the feature/fix-nullable-argument branch August 4, 2025 23:12
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.

2 participants