Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Rowan Tommins [IMSoP]
On 21 July 2024 19:33:11 BST, Juliette Reinders Folmer wrote: >The crux - to me - is that it is an undocumented breaking change, which by >definition is a bug. There are two parts of this which are bugs, in my opinion: - That it wasn't documented, e.g. with a line in UPGRADING listing the a

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Juliette Reinders Folmer
On 21-7-2024 17:11, Rowan Tommins [IMSoP] wrote: 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

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Rowan Tommins [IMSoP]
On 21 July 2024 17:45:27 BST, Deleu wrote: >I don't agree with the sentiment of "given the 2 options >available, we prefer the option where we know we are negatively impacting >community members consuming token_get_all() in favor of protecting >imaginary PHP users that would have been adventuro

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Deleu
On Sun, Jul 21, 2024 at 12:14 PM Rowan Tommins [IMSoP] wrote: > > Oddly, the crux of this debate seems to be less that all options have > major impact, and more that none of them do. > My only disagreement with your statement (and Tim's messages) is that one option *MAY* impact some imaginary PH

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Juliette Reinders Folmer
On 21-7-2024 13:28, Ilija Tovilo wrote: Hi Ilja, I agree that it's not very likely that many people started placing comments between yield and from, but certainly not impossible. The main problem with reverting this change is that such code will completely stop working. Patch updates are routi

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Rowan Tommins [IMSoP]
On 21 July 2024 12:25:27 BST, "Tim Düsterhus" 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 sid

Re: [PHP-DEV] Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()

2024-07-21 Thread Gina P. Banyard
On Sunday, 21 July 2024 at 12:24, Niels Dossche wrote: > Hi internals > > I opened a PR to add the getNextSibling() and getPreviousSibling() methods to > the tidyNode class. > As the class is final, this has no BC break concerns. > > The reason for adding this is that it's inconvenient to walk

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-07-21 Thread Tim Düsterhus
Hi On 7/20/24 03:14, Larry Garfield wrote: We've made one change since we last discussed it: Specifically, Ilija realized that __set's behavior is already inconsistent, so supporting it for aviz properties with invisible set would make it even more inconsistent, not less. For that reason, w

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Tim Düsterhus
Hi On 7/21/24 00:16, Larry Garfield wrote: Yes, any syntax change means tools need to adapt, but that doesn't mean tokenization can change randomly and accidentally. Syntax changes require an RFC. If an RFC passes that necessitates SA tools update, so be it. (That happens almost every vers

Re: [PHP-DEV] Request for opinions: bug vs feature - changeintokenization of yield from

2024-07-21 Thread Tim Düsterhus
Hi On 7/20/24 20:31, Christoph M. Becker wrote: If the tokenizer would tokenize a whole file as a single token, would that also be correct? Of course, I'm exaggerating, but The function is documented as: token_get_all() parses the given code string into PHP language tokens using the Zend e

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Ilija Tovilo
Hi Juliette On Sat, Jul 20, 2024 at 6:40 PM Juliette Reinders Folmer wrote: > > On 20-7-2024 18:04, Tim Düsterhus wrote: > > As I've said: I agree that the current situation is unfortunate. But the > correct solution is not "disallow comments", but "split the T_YIELD_FROM into > T_YIELD T_WHITE

Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from

2024-07-21 Thread Tim Düsterhus
Hi On 7/20/24 20:14, Deleu wrote: Is there any evidence that PHP users are relying on code that: - Was released just 7 months ago - Was not documented - Nobody knew about it until very recently That is the wrong question to ask (see at the bottom). And furthermore, why should undocumented,

[PHP-DEV] Add tidyNode::getNextSibling() and tidyNode::getPreviousSibling()

2024-07-21 Thread Niels Dossche
Hi internals I opened a PR to add the getNextSibling() and getPreviousSibling() methods to the tidyNode class. As the class is final, this has no BC break concerns. The reason for adding this is that it's inconvenient to walk the tree solely using the existing getParent() method and ->child pro

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2024-07-21 Thread Niels Dossche
On 28/06/2024 22:06, Máté Kocsis wrote: > Hi Everyone, > > I've been working on a new RFC for a while now, and time has come to present > it to a wider audience. > > Last year, I learnt that PHP doesn't have built-in support for parsing URLs > according to any well established standards (RFC 17

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-07-21 Thread Rob Landers
On Sat, Jul 20, 2024, at 23:51, Larry Garfield wrote: > On Sat, Jul 20, 2024, at 7:22 AM, Rodrigo Vieira wrote: > > Will the alternative syntax on hook not even be put to a vote? > > It was, a year and a half ago when Aviz was first proposed. The preference > was split, but leaned toward the p