Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Rowan Tommins
On Thu, 23 Nov 2023 at 08:48, Nicolas Grekas wrote: > Sorry this comes as a surprise to you but you're rewriting history here. > The current behavior, the one that was fixed in that commit, matches how > PHP behaved before typed properties, so this commit brought consistency. > The question of

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Nikita Popov
On Thu, Nov 23, 2023, at 09:48, Nicolas Grekas wrote: > Hi Rowan, > > Le jeu. 23 nov. 2023 à 08:56, Rowan Tommins a > écrit : > > > On 23 November 2023 01:37:06 GMT, Claude Pache > > wrote: > > >What you describe in the last sentence is what was initially designed and > > implemented by the

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Rowan Tommins
On Thu, 23 Nov 2023 at 11:48, Stephen Reay wrote: > > Respectively, I disagree that it's "not a big problem" if your goal is to > encourage people to use regular functions over classes with static methods. > Just to be clear, my answer was specifically addressing your point about using

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Robert Landers
On Thu, Nov 23, 2023 at 8:56 AM Rowan Tommins wrote: > > On 23 November 2023 01:37:06 GMT, Claude Pache wrote: > >What you describe in the last sentence is what was initially designed and > >implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 > >(section Overloaded

Re: [PHP-DEV] [RFC] [Discussion] Resource to object conversion

2023-11-23 Thread Robert Landers
On Wed, Nov 22, 2023 at 10:53 PM Deleu wrote: > > On Wed, Nov 22, 2023 at 2:08 PM G. P. B. wrote: > > > On Wed, 22 Nov 2023 at 07:36, Mike Schinkel wrote: > > > > > On Nov 21, 2023 at 11:33 PM, > > > wrote: > > > > > > What is the point of a major release if we cannot even do such a BC > >

Re: [PHP-DEV] [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Claude Pache
> Le 23 nov. 2023 à 08:56, Rowan Tommins a écrit : > > On 23 November 2023 01:37:06 GMT, Claude Pache wrote: >> What you describe in the last sentence is what was initially designed and >> implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 >> (section Overloaded

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Rowan Tommins
On Thu, 23 Nov 2023 at 06:00, Stephen Reay wrote: > I'm disappointed to see yet again that there's this implied notion that > working with PHP in 2023 means "well surely you must be using composer", > which leads to "but composer..." somehow being an accepted argument when > it comes to

[PHP-DEV] PHP 8.2.13 Released!

2023-11-23 Thread Sergey Panteleev
The PHP development team announces the immediate availability of PHP 8.2.13. This is a security release. All PHP 8.2 users are encouraged to upgrade to this version. For source downloads of PHP 8.2.13 please visit our downloads page. Windows binaries can be found on the PHP for Windows site.

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Nicolas Grekas
Hi Rowan, Le jeu. 23 nov. 2023 à 08:56, Rowan Tommins a écrit : > On 23 November 2023 01:37:06 GMT, Claude Pache > wrote: > >What you describe in the last sentence is what was initially designed and > implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 > (section Overloaded

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Stephen Reay
> On 23 Nov 2023, at 17:21, Rowan Tommins wrote: > > On Thu, 23 Nov 2023 at 06:00, Stephen Reay wrote: > >> I'm disappointed to see yet again that there's this implied notion that >> working with PHP in 2023 means "well surely you must be using composer", >> which leads to "but composer..."

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Stephen Reay
> On 24 Nov 2023, at 01:09, Rowan Tommins wrote: > > On Thu, 23 Nov 2023 at 14:20, Stephen Reay wrote: > >> >> Out of the box, with no package manager or module loader or anything, you >> can do as little as call `spl_autoload_register` with no arguments, and >> have working class

[PHP-DEV] [RFC] [VOTE] Change the edge case of round()

2023-11-23 Thread Saki Takamachi
Hi internals, I started voting on my RFC "Change the edge case of round()”. Voting will end December 8th, 00:00 GMT. https://wiki.php.net/rfc/change_the_edge_case_of_round Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Lanre Waju
Seriously? Are you really this stupid or just feigning ignorance? How is this a global: class X { private static $count = 0; } I am no longer pushing this RFC because idiots like you are in charge of the votes but seriously your argument is dumb as fuck. If you aren't sure then why say

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Rowan Tommins
On Thu, 23 Nov 2023 at 14:20, Stephen Reay wrote: > > Out of the box, with no package manager or module loader or anything, you > can do as little as call `spl_autoload_register` with no arguments, and > have working class autoloading. > Sure, it's just about possible that you could paste that

Re: [PHP-DEV] [RFC][Discussion] Why can constructors violate LSP?

2023-11-23 Thread Deleu
On Thu, Nov 23, 2023 at 5:31 PM Robert Landers wrote: > Hello Internals, > > As you may know, an inherited method cannot reduce the visibility of > an overridden method. For example, this results in a fatal error > during compilation: > > class P { > public function hello($name = 'world') {

[PHP-DEV] PHP 8.3.0 Released!

2023-11-23 Thread Jakub Zelenka
The PHP development team announces the immediate availability of PHP 8.3.0. This release marks the latest major release of the PHP language. PHP 8.3 comes with numerous improvements and new features such as: - Typed Class Constants - Fetch class constant dynamically syntax - Readonly Amendments -

[PHP-DEV] [RFC][Discussion] Why can constructors violate LSP?

2023-11-23 Thread Robert Landers
Hello Internals, As you may know, an inherited method cannot reduce the visibility of an overridden method. For example, this results in a fatal error during compilation: class P { public function hello($name = 'world') { echo "hello $name\n"; } } class C extends P { private

Re: [PHP-DEV] [RFC][Discussion] Why can constructors violate LSP?

2023-11-23 Thread Rowan Tommins
On 23 November 2023 20:31:09 GMT, Robert Landers wrote: >I'd like to propose an RFC to enforce the covariance of constructors >(just like is done for other methods), to take effect in PHP 9, with a >deprecation notice in 8.3.x. There's a lot more than visibility that is enforced on normal

Re: [PHP-DEV] [RFC][Discussion] Why can constructors violate LSP?

2023-11-23 Thread Robert Landers
On Thu, Nov 23, 2023 at 10:30 PM Deleu wrote: > > > > On Thu, Nov 23, 2023 at 5:31 PM Robert Landers > wrote: >> >> Hello Internals, >> >> As you may know, an inherited method cannot reduce the visibility of >> an overridden method. For example, this results in a fatal error >> during

[PHP-DEV] Re: [RFC] [VOTE] Adding bcround, bcfloor and bcceil to BCMath

2023-11-23 Thread Saki Takamachi
Hi internals, > Voting will end November 30th, 00:00 GMT. I made a mistake in my calculation. It's until the 29th. Regards. Saki -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC][Discussion] Why can constructors violate LSP?

2023-11-23 Thread Mike Schinkel
> On Nov 23, 2023, at 4:50 PM, Robert Landers wrote: > > On Thu, Nov 23, 2023 at 10:30 PM Deleu wrote: >> >> Constructors are an implementation detail of a specialized class and as such >> they're not subject to LSP because the goal of LSP is to be able to make >> sure that any object of a

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Lanre Waju
Again, with so many absolutes. Static APIs aren't inherently bad; rather, bad programmers write poor code. It seems like you're assuming that PHP developers can't make decisions about what tools to use independently and need explicit encouragement or endorsement from you. Just because you are

Re: [PHP-DEV] PHP 8.3.0 Released!

2023-11-23 Thread Paul Dragoonis
On Thu, Nov 23, 2023 at 4:57 PM Jakub Zelenka wrote: > The PHP development team announces the immediate availability of PHP 8.3.0. > This release marks the latest major release of the PHP language. > > PHP 8.3 comes with numerous improvements and new features such as: > - Typed Class Constants >

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Stephen Reay
> On 23 Nov 2023, at 19:42, Rowan Tommins wrote: > > On Thu, 23 Nov 2023 at 11:48, Stephen Reay wrote: > >> >> Respectively, I disagree that it's "not a big problem" if your goal is to >> encourage people to use regular functions over classes with static methods. >> > > > Just to be

Re: [PHP-DEV] RFC Proposal - static modifier for classes

2023-11-23 Thread Larry Garfield
On Thu, Nov 23, 2023, at 1:43 AM, Robert Landers wrote: > I'd venture to say that static classes have some unique benefits over > plain functions. One, you can encapsulate state using private static > variables. That simply isn't possible with regular functions (unless > you use static variables

[PHP-DEV] PHP 8.1.26 Released!

2023-11-23 Thread Ben Ramsey
The PHP development team announces the immediate availability of PHP 8.1.26. This is a bug fix release. All PHP 8.1 users are encouraged to upgrade to this version. For source downloads of PHP 8.1.26 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The