Skip to content

Getting "Implicitly marking parameter $externalId as nullable is deprecated" error when using PHP 8.4.5 #77

@kurt-wasabi

Description

@kurt-wasabi

Hi.

Thanks for providing these slack-php tools.

I recently upgraded to PHP v8.4.5 and got an error when trying to post msgs using chatPostMessage().

Error message was:
SlackPhp\\BlockKit\\Kit::file(): Implicitly marking parameter $externalId as nullable is deprecated, the explicit nullable type must be used instead

I think the fix is to change line 123 in Kit.php from:
string $externalId = null,

to:
?string $externalId = null,

I realize this may only be one of many issues related to PHP v8.4.4 compatibility, but this is the one that I ran into.

Should I submit a Pull Request for the above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions