Skip to content

Conversation

@acelaya
Copy link

@acelaya acelaya commented Dec 1, 2024

This PR fixes some deprecation warnings thrown with PHP 8.4 due to implicit nullability in some method arguments.

The solution involves explicitly marking them as nullable with ?string $foo = null instead of string $foo = null.

See the RFC for details https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Additionally, I also added PHP 8.4 to the php workflow, to verify deprecation warnings are not printed.

@WyriHaximus WyriHaximus added the bug Something isn't working label Dec 1, 2024
Copy link
Collaborator

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, leaving it up to @DEVizzent to decide if this is a breaking change for the interfaces and needs a new major or not. Thanks for putting this together 👍

@acelaya
Copy link
Author

acelaya commented Dec 2, 2024

The changes in interfaces are not breaking changes. Anyone who's implementing them in userland code and does not explicitly define the nullable type, can safely update to this and won't get any error.

See https://3v4l.org/1Wcnh

@WyriHaximus
Copy link
Collaborator

The changes in interfaces are not breaking changes. Anyone who's implementing them in userland code and does not explicitly define the nullable type, can safely update to this and won't get any error.

See https://3v4l.org/1Wcnh

Fair, forgot about that one 😅

@DEVizzent DEVizzent merged commit 44920bc into DEVizzent:master Dec 3, 2024
54 checks passed
@acelaya acelaya deleted the php-8.4-deprecations branch December 3, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants