Skip to content

Add a check for implicitly nullable parameters - #3252

Merged
xirvik merged 1 commit into
Novik:masterfrom
xirvik:tests/implicit-nullable-parameters
Sep 2, 2026
Merged

Add a check for implicitly nullable parameters#3252
xirvik merged 1 commit into
Novik:masterfrom
xirvik:tests/implicit-nullable-parameters

Conversation

@xirvik

@xirvik xirvik commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

A parameter written int $count = null is nullable by implication. PHP 8.4 deprecates that spelling, so every call into such a function emits a deprecation notice from shipped code, into whatever log PHP writes to, which an operator cannot fix without editing the tree.

The signatures were made explicit in #3217. This scans the shipped tree for the spelling so it cannot come back, reading the files rather than reflecting on them: plugins are loaded a request at a time, and a file no test happens to include would otherwise go unchecked.

A parameter written `int $count = null` is nullable by implication.
PHP 8.4 deprecates that spelling, so every call into such a function
emits a deprecation notice from shipped code, into whatever log PHP
writes to, which an operator cannot fix without editing the tree.

The signatures were made explicit in Novik#3217. This scans the shipped
tree for the spelling so it cannot come back, reading the files
rather than reflecting on them: plugins are loaded a request at a
time, and a file no test happens to include would otherwise go
unchecked.
@xirvik
xirvik merged commit cd814cb into Novik:master Sep 2, 2026
8 checks passed
@xirvik
xirvik deleted the tests/implicit-nullable-parameters branch September 2, 2026 18:39
IvanShift added a commit to IvanShift/ruTorrent that referenced this pull request Sep 3, 2026
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.

1 participant