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

PHP 8.4 | Fix implicitly nullable parameter #147

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Aug 27, 2024

PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a null default value, which are not explicitly declared as nullable.

This commit fixes the one instance found in this codebase.

Includes updating the documentation to match.

Note: while this is not a final class and the change is effectively a change to the method signature, this is not a BC break as (overloaded) constructors are exempt from signature checks.

Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a `null` default value, which are not explicitly declared as nullable.

This commit fixes the one instance found in this codebase.

Includes updating the documentation to match.

Note: while this is not a `final` class and the change is effectively a change to the method signature, this is not a BC break as (overloaded) constructors are exempt from signature checks.

Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
@jrfnl jrfnl added this to the 2.x Next milestone Aug 27, 2024
@jrfnl jrfnl requested a review from gmazzap August 27, 2024 21:31
@jrfnl jrfnl force-pushed the feature/php-8.4-fixes branch from 530e911 to d711f8c Compare August 27, 2024 21:31
@jrfnl jrfnl mentioned this pull request Aug 27, 2024
@jrfnl
Copy link
Collaborator Author

jrfnl commented Aug 28, 2024

@gmazzap I see your approval. Any particular reason not to merge this though ?

@gmazzap
Copy link
Collaborator

gmazzap commented Aug 28, 2024

No, I thought you would merge. But I can do that

@gmazzap gmazzap merged commit f5b3384 into master Aug 28, 2024
20 of 21 checks passed
@gmazzap gmazzap deleted the feature/php-8.4-fixes branch August 28, 2024 20:07
@jrfnl
Copy link
Collaborator Author

jrfnl commented Aug 28, 2024

No, I thought you would merge. But I can do that

Ah, I'm used to not merging my own PRs (unless I'm the sole maintainer and submitted the PR, but that's not the case here).

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