You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting some warnings that should not be warnings. Please correct me if I am wrong.
According to the PHP docs:
Caution
If you use yield in an expression context (for example, on the right hand side of an assignment), you must surround the yield statement with parentheses in PHP 5. For example, this is valid:
$data = (yield $value);
But this is not, and will result in a parse error in PHP 5:
$data = yield $value;
The parenthetical restrictions do not apply in PHP 7.
This means that in PHP 7 does not matter if yield uses () or not. However, If you are supporting backward compatible you should add the () around yield.
I am using an external package that is giving me this error: [Warning] "yield" usage in expression context
Looking over the yield implementations, it looks like we are wrapping them around (). Any particular reason why I still get this error? Should we avoid this error if there is () around yield?
The text was updated successfully, but these errors were encountered:
I am getting some warnings that should not be warnings. Please correct me if I am wrong.
According to the PHP docs:
This means that in PHP 7 does not matter if yield uses
()
or not. However, If you are supporting backward compatible you should add the()
around yield.I am using an external package that is giving me this error:
[Warning] "yield" usage in expression context
File:
/aws/aws-sdk-php/src/S3/S3MultiRegionClient.php
Looking over the
yield
implementations, it looks like we are wrapping them around().
Any particular reason why I still get this error? Should we avoid this error if there is()
aroundyield
?The text was updated successfully, but these errors were encountered: