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

$message in stream_notification_callback() is nullable #2767

Merged
merged 1 commit into from
Sep 16, 2023
Merged

$message in stream_notification_callback() is nullable #2767

merged 1 commit into from
Sep 16, 2023

Conversation

spaze
Copy link
Contributor

@spaze spaze commented Sep 13, 2023

At least for HTTP streams, the $message parameter of stream_notification_callback() is nullable, let's document it.

See https://onlinephp.io/c/f0a2fc for a simple script to get the types.

spaze added a commit to spaze/michalspacek.cz that referenced this pull request Sep 13, 2023
…back

I had it right in MichalSpacekCz\Http\HttpStreamContext::create(), which probably should be used instead, but followed the example in PHP docs that says only `string $message`.

PHP docs PR php/doc-en#2767

Introduced in bd8c089 in #220
spaze added a commit to spaze/michalspacek.cz that referenced this pull request Sep 13, 2023
…back

I had it right in MichalSpacekCz\Http\HttpStreamContext::create(), which probably should be used instead, but followed the example in PHP docs that says only `string $message`.

PHP docs PR php/doc-en#2767

Introduced in bd8c089 in #220
spaze added a commit to spaze/michalspacek.cz that referenced this pull request Sep 13, 2023
…` callback (#222)

I had it right in `MichalSpacekCz\Http\HttpStreamContext::create()`, which probably should be used instead, but followed the example in PHP docs that says only `string $message`.

PHP docs PR php/doc-en#2767

Introduced in bd8c089 in #220
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the markup of how a union type is written.

But the change is correct.

@kocsismate I wonder what we should do with those pages, as there are no stubs/interfaces for custom streams or related functions

@spaze
Copy link
Contributor Author

spaze commented Sep 16, 2023

Oh, I'm sorry I messed it up. Corrected the markup.

@spaze spaze requested a review from Girgias September 16, 2023 20:39
@Girgias Girgias merged commit aca5892 into php:master Sep 16, 2023
2 checks passed
@Girgias
Copy link
Member

Girgias commented Sep 16, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants