Hi Everyone, Recently, I realized that the stream_bucket_new() and stream_bucket_make_writeable() functions create stdClass instances by dynamically adding a "bucket", a "data" and a "datalen" property to it.
A few days ago, I submitted a PR which makes the above mentioned functions return a dedicated StreamBucket class which has these parameters properly declared (https://github.com/php/php-src/pull/13111/). Furthermore, stream_bucket_prepend() and stream_bucket_append() would accept objects of this class as their second parameter from now on. Before, they accepted any kind of objects as long as they had a "bucket" property containing a valid stream. As far as I see, my changes are backward compatible as long as people use the stream bucket API properly (i.e. create stream buckets via stream_bucket_new() and stream_bucket_make_writeable()). If they manually construct such objects (i.e. $bucket = new stdClass(); $bucket->bucket = ....) then obviously, they would start to face type errors. So my question is whether anyone has any use-case/preexisting code which falls into the second case? If no one knows about the invalid usage pattern, my next question would be whether I have to create an RFC for this change? Regards, Máté