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

2024-07-18 Thread Juliette Reinders Folmer
On 19-7-2024 1:09, Bob Weinand wrote: Hey Christoph, Am 19.07.2024 um 00:51 schrieb Christoph M. Becker : Hi Bob! On 18.07.2024 at 15:41, Bob Weinand wrote: Moreover, it can - at least - be worked around in tooling by special casing the T_YIELD_FROM token and extracting the comment from th

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Faizan Akram Dar
On Fri, Jul 19, 2024 at 1:34 AM Oliver Nybroe wrote: > Hello internals. > > I am looking into making the constructor body optional in classes, > essentially allowing you to write > > ``` > class User { > public function __construct( > private string $name, > ) > } > ``` > > Curren

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

2024-07-18 Thread Bob Weinand
Hey Christoph, Am 19.07.2024 um 00:51 schrieb Christoph M. Becker : Hi Bob! On 18.07.2024 at 15:41, Bob Weinand wrote: Moreover, it can - at least - be worked around in tooling by special casing the T_YIELD_FROM token and extracting the comment from the raw parsed string: var_dump(token_get_

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

2024-07-18 Thread Christoph M. Becker
Hi Tim! On 18.07.2024 at 21:05, Tim Düsterhus wrote: > On 7/18/24 19:48, Marco Aurélio Deleu wrote: > >> Forcing all tooling that uses token_get_all() to handle this >> unintentional change seems to generate more unnecessary and real >> busywork for something only theoretical possible to break. >

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

2024-07-18 Thread Christoph M. Becker
Hi Bob! On 18.07.2024 at 15:41, Bob Weinand wrote: > Moreover, it can - at least - be worked around in tooling by special casing > the T_YIELD_FROM token and extracting the comment from the raw parsed string: > > var_dump(token_get_all(' > will contain: > > [1]=> array(3) { [0]=> int(270) [1]=>

Re: [PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Christoph M. Becker
Hi Niels! On 18.07.2024 at 14:44, Niels Dossche wrote: > I believe they should be synced indeed, although we should be careful > with extensions that are dropped from PHP (e.g. imap). Those entries > should remain only in 8.2 and 8.3 but not in master. Oh, right! My idea was to handle this like

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Tim Düsterhus
Hi On 7/17/24 20:31, Nicolas Grekas wrote: A bit unrelated to the above topic: we've further clarified the RFC by addition restrictions to what can be done with lazy proxies. Namely, when the factory returns an object from a parent class, we describe that adding more on the proxy class would thr

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Tim Düsterhus
Hi On 7/12/24 08:47, Rob Landers wrote: I think it would be up to the developer writing the proxy framework to use or abuse this As I've just explained in my reply to Nicolas this is observable to the user and thus leaks implementation details of the proxy framework. Currently, clone's de

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Tim Düsterhus
Hi On 7/15/24 10:23, Nicolas Grekas wrote: To me this is what the language evolution should do: Enable users to do things that previously needed to be provided by userland libraries, because they were complicated and fragile, not enabling userland libraries to simplify things that they should no

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

2024-07-18 Thread Marco Aurélio Deleu
I can't speak for Juliette's plans but I would advocate for pinning PHP 8.3.{fixed} on Composer and having an error message for PHAR. It's also worth mentioning that just because it's possible to add comments in those versions doesn't mean we must assume that it wi be done and it must be support

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Gina P. Banyard
On Thursday, 18 July 2024 at 19:23, Tim Düsterhus wrote: > On 7/18/24 16:03, Lily Bergonzat wrote: > > > I feel like the more substantial one would be more likely to break > > stuff, compared to the minor one, and so I don't see why the minor one > > would be refused? > > > There is no such thi

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4

2024-07-18 Thread Gina P. Banyard
On Tuesday, 25 June 2024 at 15:36, Gina P. Banyard wrote: > Hello internals, > > It is this time of year again where we proposed a list of deprecations to add > in PHP 8.4: > > https://wiki.php.net/rfc/deprecations_php_8_4 > > As a reminder, this list has been compiled over the course of the

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Arnaud Le Blanc
Hi Philip, On Thu, Jul 18, 2024 at 12:19 PM Philip Hofstetter wrote: > Super minor nitpick: You have updated the prototype, but not the explanation > text which still says: > >> When initialization is required, the $initializer is called with the object >> as first parameter. The initializer sh

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

2024-07-18 Thread Tim Düsterhus
Hi On 7/18/24 19:48, Marco Aurélio Deleu wrote: Forcing all tooling that uses token_get_all() to handle this unintentional change seems to generate more unnecessary and real busywork for something only theoretical possible to break. The tools are required to handle this either way, because t

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4

2024-07-18 Thread Tim Düsterhus
Hi On 7/16/24 13:04, Christoph M. Becker wrote: See also a respective GH issue regarding deprecation messages: ; it probably makes sense to include an URL in the deprecation message, or maybe some code which users can use to look up more thorough info

[PHP-DEV] PHP 8.2.22RC1 available for testing

2024-07-18 Thread Pierrick Charron
PHP 8.2.22RC1 has just been released and can be downloaded from: https://downloads.php.net/~pierrick/ or https://qa.php.net/ or use the git tag: php-8.2.22RC1 Windows binaries are available at: https://windows.php.net/qa/#php-8.2 Please test it carefully, and report any bugs to https://github

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Tim Düsterhus
Hi On 7/18/24 17:04, Lily Bergonzat wrote: I am not top-posting right now? Thank you for giving me a nudge. To confirm: Yes, this email is not a top post. Top-posting means putting your reply at the very top of the email, above the quoted bits, instead of below them. The "gold standard" woul

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Tim Düsterhus
Hi On 7/18/24 16:03, Lily Bergonzat wrote: I feel like the more substantial one would be more likely to break stuff, compared to the minor one, and so I don't see why the minor one would be refused? There is no such thing as a minor syntax change. Any changes to the syntax has consequences fo

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

2024-07-18 Thread Marco Aurélio Deleu
> On 17 Jul 2024, at 20:16, Juliette Reinders Folmer > wrote: > >  Hi all, > > I recently discovered a change was made to the Tokenizer in PHP 8.3.0 which > now allows for a comment to exist between the `yield` and `from` keyword from > the `yield from` keyword. > Before PHP 8.3, this was a

Re: [PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Peter Kokot
On Thu, 18 Jul 2024, 16:32 Ilija Tovilo, wrote: > Hi Christoph > > On Thu, Jul 18, 2024 at 2:09 PM Christoph M. Becker > wrote: > > > > So I suggest to sync CODEOWNERS for all active branches (and maybe even > > security branches). > > > > What do you think? > > I think back when it was introduc

Re: [PHP-DEV] [VOTE] Correctly name the rounding mode and make it an Enum

2024-07-18 Thread Tim Düsterhus
Hi On 7/3/24 08:32, Tim Düsterhus wrote: RFC Text: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum Discussion Thread: https://externals.io/message/123472 The RFC has been accepted unanimously with 34 (yes) to 0 (no) votes. I'll now make the final adjustments to

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Oliver Nybroe
On Thu, 18 Jul 2024 at 15:48, Larry Garfield wrote: > > Please don't top-post. > > Since the last time this came up, PSR-12 has been replaced with PER-CS, > which as of 2.0 now says: > > > If a function or method contains no statements or comments (such as an > empty no-op implementation or when

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Lily Bergonzat
On Thu, Jul 18, 2024 at 4:40 PM Larry Garfield wrote: > > On Thu, Jul 18, 2024, at 2:03 PM, Lily Bergonzat wrote: > > I would love to see those improvements as well, however I am surprised > > we seem to be more inclined to push a more substantial change than a > > minor one. > > > > I feel like t

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Larry Garfield
On Thu, Jul 18, 2024, at 2:03 PM, Lily Bergonzat wrote: > I would love to see those improvements as well, however I am surprised > we seem to be more inclined to push a more substantial change than a > minor one. > > I feel like the more substantial one would be more likely to break > stuff, compar

[PHP-DEV] PHP 8.4.0alpha2 is available for testing

2024-07-18 Thread Calvin Buckley
PHP 8.4.0alpha2 has just been released and can be downloaded from: https://downloads.php.net/~calvinb Or use the git tag: php-8.4.0alpha2 Windows binaries are available at: https://windows.php.net/qa/ Please test it carefully, and report any bugs at https:/github.com/php/php-src/issues 8.4.0alp

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Lily Bergonzat
I would love to see those improvements as well, however I am surprised we seem to be more inclined to push a more substantial change than a minor one. I feel like the more substantial one would be more likely to break stuff, compared to the minor one, and so I don't see why the minor one would be

[PHP-DEV] PHP 8.3.10RC1 Ready for testing

2024-07-18 Thread ericmann
PHP 8.3.10RC1 has just been released and can be downloaded from: https://downloads.php.net/~eric/ or https://qa.php.net/ or use the git tag: php-8.3.10RC1 Windows binaries are available at: https://windows.php.net/qa/#php-8.3 Please test it carefully, and report any bugs to https://github.c

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Larry Garfield
On Thu, Jul 18, 2024, at 10:11 AM, Oliver Nybroe wrote: > Thanks for sharing previous discussions, I will definitely take a look > at those before writing up the RFC. > > >> If you do with to go with an RFC, I'd like to see if your proposal > addresses whether this syntax should implicitly call >

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

2024-07-18 Thread Bob Weinand
Am 18.07.2024 um 01:15 schrieb Juliette Reinders Folmer :  Hi all, I recently discovered a change was made to the Tokenizer in PHP 8.3.0 which now allows for a comment to exist between the `yield` and `from` keyword from the `yield from` keyword. Before PHP 8.3, this was a parse error. This

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Rob Landers
On Thu, Jul 18, 2024, at 12:11, Oliver Nybroe wrote: > Thanks for sharing previous discussions, I will definitely take a look at > those before writing up the RFC. > > > > If you do with to go with an RFC, I'd like to see if your proposal > addresses whether this syntax should implicitly call >

Re: [PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Ilija Tovilo
Hi Christoph On Thu, Jul 18, 2024 at 2:09 PM Christoph M. Becker wrote: > > So I suggest to sync CODEOWNERS for all active branches (and maybe even > security branches). > > What do you think? I think back when it was introduced it wasn't clear (at least to me) that PRs would request reviews bas

Re: [PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Niels Dossche
On 18/07/2024 14:08, Christoph M. Becker wrote: > Hi all! > > I have noticed that the CODEOWNERS of php-src are apparently not synced > for all active branches[1][2]. However, it seems to me that this > doesn't make sense; if someone provides a PR against some lower branch, > the most recent CODE

Re: [PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Saki Takamachi
Hi Christoph, > Hi all! > > I have noticed that the CODEOWNERS of php-src are apparently not synced > for all active branches[1][2]. However, it seems to me that this > doesn't make sense; if someone provides a PR against some lower branch, > the most recent CODEOWNERS may not be notified, and

[PHP-DEV] Sync CODEOWNERS

2024-07-18 Thread Christoph M. Becker
Hi all! I have noticed that the CODEOWNERS of php-src are apparently not synced for all active branches[1][2]. However, it seems to me that this doesn't make sense; if someone provides a PR against some lower branch, the most recent CODEOWNERS may not be notified, and modifications might be send

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Philip Hofstetter
Hi, Minor point: Why is the $initializer return type null, instead of void? I >> don't see a purpose to allowing an explicit null return and nothing else. >> > > Updated to use "void". Both would work :) > > Super minor nitpick: You have updated the prototype, but not the explanation text which

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Oliver Nybroe
Thanks for sharing previous discussions, I will definitely take a look at those before writing up the RFC. > If you do with to go with an RFC, I'd like to see if your proposal addresses whether this syntax should implicitly call `parent::__construct()`, and if a semi colon is expected or not (`pu

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Lily Bergonzat
I don't view this proposition as a breaking change. The way I understand it, writing an empty body for a constructor would still work, but we would also get the option to just omit the body altogether. I think it would be a very sensible update. I also think it should require a semicolon, just so

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Ayesh Karunaratne
> > Hello internals. > > I am looking into making the constructor body optional in classes, > essentially allowing you to write > > ``` > class User { > public function __construct( > private string $name, > ) > } > ``` > > Currently to make this code valid, it would have to be wri

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Christoph M. Becker
Hi Oliver! On 18.07.2024 at 11:21, Oliver Nybroe wrote: > I am looking into making the constructor body optional in classes, > essentially allowing you to write > > ``` > class User { > public function __construct( > private string $name, > ) > } > ``` See https://externals.io/me

[PHP-DEV] Optional constructor body

2024-07-18 Thread Oliver Nybroe
Hello internals. I am looking into making the constructor body optional in classes, essentially allowing you to write ``` class User { public function __construct( private string $name, ) } ``` Currently to make this code valid, it would have to be written the following way ```

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Nicolas Grekas
Le jeu. 18 juil. 2024 à 00:13, Larry Garfield a écrit : > On Wed, Jul 17, 2024, at 6:31 PM, Nicolas Grekas wrote: > > > A bit unrelated to the above topic: we've further clarified the RFC by > > addition restrictions to what can be done with lazy proxies. Namely, > > when the factory returns an o

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Nicolas Grekas
Le jeu. 18 juil. 2024 à 09:08, Rob Landers a écrit : > On Wed, Jul 17, 2024, at 20:31, Nicolas Grekas wrote: > > Dear all, > > Le mar. 16 juil. 2024 à 17:51, Nicolas Grekas < > nicolas.grekas+...@gmail.com> a écrit : > > Hi there, > > Le mar. 16 juil. 2024 à 10:13, Nicolas Grekas < > nicolas.grek

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-18 Thread Rob Landers
On Wed, Jul 17, 2024, at 20:31, Nicolas Grekas wrote: > Dear all, > > Le mar. 16 juil. 2024 à 17:51, Nicolas Grekas > a écrit : >> Hi there, >> >> Le mar. 16 juil. 2024 à 10:13, Nicolas Grekas > > a écrit : >>> >>> >