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

Zend incompatibility: Generator::send returns null #6807

Closed
jeskew opened this issue Feb 4, 2016 · 5 comments
Closed

Zend incompatibility: Generator::send returns null #6807

jeskew opened this issue Feb 4, 2016 · 5 comments

Comments

@jeskew
Copy link

jeskew commented Feb 4, 2016

Generator::send appears to return null instead of the value yielded. This breaks Guzzle coroutines, which yield out promises and expect the value which fulfills each promise to be sent back in.

Reproduction script: https://3v4l.org/fMsKp
With more verbose output: https://3v4l.org/mMvOC

@jeskew jeskew changed the title Yield incompatibility in HHVM 3.11 Yield incompatibility in HHVM 3.11 & 3.12 Mar 20, 2016
@jeskew jeskew changed the title Yield incompatibility in HHVM 3.11 & 3.12 Zend incompatibility: Generator::send returns null Mar 20, 2016
@jeskew
Copy link
Author

jeskew commented Mar 21, 2016

This issue makes advanced features of the AWS SDK for PHP and Guzzle 6 incompatible with HHVM. Any chance this could at least be acknowledged and labeled as a Zend incompatibility?

@wulftone
Copy link

Just ran into this and noticed it's a year old... is this on the roadmap to fix?

@effeks
Copy link

effeks commented Nov 23, 2017

This is still an issue, even with later HHVM-versions, right?

@lexidor
Copy link
Contributor

lexidor commented May 25, 2020

Yep it still is, but the hhi notes that it returns void (null).

@lexidor
Copy link
Contributor

lexidor commented Jun 14, 2023

Hi, I am reading HHVM issues to see which issues are unlikely to be fixed.

This issue was created because HHVM's behavior was/is different from PHP's. HHVM stopped striving from php compatibility with the release of version 4.0.0.

The current behavior, although different, is not buggy or broken. The HHI also notes that send will return void (which is a null that shouldn't be used). I suspect all Hack code out there is aware of this and uses ->current() to get the value from the generator.

@lexidor lexidor closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants