On 21 July 2024 12:25:27 BST, "Tim Düsterhus" <t...@bastelstu.be> wrote: >The change has also been explicitly acked by Gina and Christoph before Ilija >committed it and Bob also participated in the PR without raising concerns, so >it's also not an unapproved change. The fact that none of them anticipated >this side effect, doesn't make it unapproved.
I note that Gina commented: > This is kinda cursed... but sure why not. And Christoph wrote: > Let's say that I'm generally not happy with complicating the parser with > work-arounds, but this is okay for me. So, hardly a confident consensus that this was the right approach. Regardless, we are where we are, and there's general agreement that the current implementation is not ideal, and that we can and should improve it, just not on how and in what version. Oddly, the crux of this debate seems to be less that all options have major impact, and more that none of them do. If the implementation had caused a serious security or performance regression, I don't think we'd have any hesitation in backing it out if a better implementation wasn't ready; or contrarily, if it had been a headline new feature, we wouldn't even be considering that option. As it is, an improved implementation *is* proposed: https://github.com/php/php-src/pull/15041 Comparing this purely against 8.2, it seems a reasonable compromise: consumers of the token stream still need to make a change, but it's the slightly more intuitive one of "treat yield and from as separate tokens, which might have other tokens between". Personally, I think it's reasonable to consider that a bug fix to the original change, and push it into 8.3. Projects using the token stream could detect the versions with the imperfect implementation, and emit an error explaining the "bug" if a T_YIELD_FROM token doesn't match /yield\s+from/ Projects parsing the source code on their own will have to handle this however they handle contexts where comments have always been allowed. The Ubuntu LTS situation is unfortunate, but maybe Ondřej Surý will have an opinion on what to do with the patch there. Regards, Rowan Tommins [IMSoP]