Hi Internals,
As I have already shared my intentions in
https://externals.io/message/122149, I'd like to add a dedicated object for
stream buckets as opposed to the stdClass instances which are used nowadays.
Please read https://wiki.php.net/rfc/dedicated_stream_bucket
Regards,
Máté
What should users replace $bucket property with in PHP 8.4? Is there
an alternative or is this a deprecation without a way to solve it? If
there is currently no alternative I would not deprecate it. Just
remove it once it becomes useless.
What should users replace $bucket property with in PHP 8.4? Is there
an alternative or is this a deprecation without a way to solve it? If
there is currently no alternative I would not deprecate it. Just
remove it once it becomes useless.
Do users actually use the $bucket property? I would be surprised if they
did. They don't
have to use it as far as I can see.
Cheers,
Máté
Le sam. 20 janv. 2024 à 13:42, Máté Kocsis kocsismate90@gmail.com a
écrit :
What should users replace $bucket property with in PHP 8.4? Is there
an alternative or is this a deprecation without a way to solve it? If
there is currently no alternative I would not deprecate it. Just
remove it once it becomes useless.Do users actually use the $bucket property? I would be surprised if they
did. They don't
have to use it as far as I can see.
I've used it a few year ago in a stream filtering experiment:
https://github.com/nicolas-grekas/Patchwork-PHP-Parser/blob/master/class/Patchwork/PPP/AbstractStreamProcessor.php
I don't remember the purpose of the property though. This would need more
investigation.
Nicolas
Hey Nicolas,
Sorry for the multi-months pause, I was working on other stuff recently.
Thank you again for the insights! I'm not sure anyone besides you has ever
used this property, but now we know
about at least one use-case. :) That's why I slightly changed the proposal:
the property would only be deprecated
as soon as the resource to object migration happens, and it would be kept
at least for an additional major release
cycle.
I hope that the proposal is fine this way. If there will be no complaints,
I would like to start the vote
sometime next week.
Regards,
Máté