Skip to content

PHP 8.4 compatibility: explicit nullable parameter type - #37

Merged
mhujer merged 1 commit into
mhujer:masterfrom
soukicz:master
Sep 25, 2026
Merged

mhujer merged 1 commit into
mhujer:masterfrom
soukicz:master

Conversation

@soukicz

@soukicz soukicz commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Under PHP 8.4, an implicitly-nullable parameter (a non-nullable type with a null default) emits "Implicitly marking parameter as nullable is deprecated". Downloader's constructor declared ClientInterface $client = null, so it fires once per class compile on 8.4.

Mark the parameter explicitly nullable. The property is already documented @var ?ClientInterface, so this only makes the signature match the intent; behaviour is unchanged.

Under PHP 8.4, an implicitly-nullable parameter (a non-nullable type
with a `null` default) emits "Implicitly marking parameter as nullable
is deprecated". Downloader's constructor declared `ClientInterface
$client = null`, so it fires once per class compile on 8.4.

Mark the parameter explicitly nullable. The property is already
documented `@var ?ClientInterface`, so this only makes the signature
match the intent; behaviour is unchanged.
@KminekMatej

KminekMatej commented Sep 22, 2026 •

Copy link
Copy Markdown

Any chance on merging that @mhujer ? Thats probably the easiest fix that ever existed in php :)

@mhujer
mhujer merged commit d51e43c into mhujer:master Sep 25, 2026
0 of 9 checks passed
@mhujer

mhujer commented Sep 25, 2026

Copy link
Copy Markdown
Owner

@KminekMatej merged, but I don't have any capacity to dedicate to this library anymore (I haven't used it myself for more than 3 years)

@KminekMatej

Copy link
Copy Markdown

@mhujer Thats pretty much understandable - in the meantime I already found a fork of your library, with this minor bug already fixed, but under active development. If you dont have any plans of continuing the development, perhaps pointing to that fork in readme (and probably marking this lib in packagist deprecated) could help the incoming users as well: https://github.com/webwingscz/fio-api-php

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.

3 participants