Skip to content

Conversation

krb19xx
Copy link
Contributor

@krb19xx krb19xx commented Apr 5, 2025

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 v4.4 compatibility, but this is the one that I ran into.

@krb19xx krb19xx changed the title made external id explicitly nullable make external id explicitly nullable Apr 5, 2025
@maartenpaauw maartenpaauw changed the title make external id explicitly nullable make properties explicitly nullable Apr 7, 2025
@maartenpaauw maartenpaauw merged commit ecc1d73 into slack-php:main Apr 7, 2025
3 checks passed
@maartenpaauw
Copy link
Collaborator

@krb19xx thank you!

@maartenpaauw maartenpaauw self-assigned this Apr 7, 2025
@maartenpaauw maartenpaauw added the bug Something isn't working label Apr 7, 2025
@maartenpaauw maartenpaauw self-requested a review April 7, 2025 09:51
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.

2 participants