Re: [PHP-DEV] Re: [RFC][Dynamic class constant fetch]

2022-12-08 Thread Ilija Tovilo
Hi Nicolas >> > https://wiki.php.net/rfc/dynamic_class_constant_fetch >> > > I'm wondering about this: > > > This RFC proposes no change in the interaction between class constant > > fetches and the null-coalescing operator ??. That is, Foo::{$bar} ?? null; > > will throw an Error if the given

Re: [PHP-DEV] What's new in 8.2: DNF types

2022-12-08 Thread Christoph M. Becker
On 08.12.2022 at 15:40, Robert Landers wrote: > On Thu, Dec 8, 2022 at 1:39 PM Thomas Gutbier > wrote: > >> I think in this example the check for null can be removed. >> The feature is so much more useful than presented here. >> >> (https://www.php.net/releases/8.2/en.php#dnf_types) >> >>

Re: [PHP-DEV] [RFC] More Appropriate Date/Time Exceptions

2022-12-08 Thread Tim Düsterhus
Hi On 12/8/22 15:11, Dan Ackroyd wrote: None of the 'Invalid serialization' errors tell the programmer who reads them what is wrong with the data. Unless the code was written in such a way that the data was in (and was logged) in the callstack, that would be a bit frustrating as someone might

Re: [PHP-DEV] What's new in 8.2: DNF types

2022-12-08 Thread Robert Landers
On Thu, Dec 8, 2022 at 1:39 PM Thomas Gutbier wrote: > > I think in this example the check for null can be removed. > The feature is so much more useful than presented here. > > (https://www.php.net/releases/8.2/en.php#dnf_types) > > class Foo { > public function bar((A)|null $entity)

Re: [PHP-DEV] [RFC] More Appropriate Date/Time Exceptions

2022-12-08 Thread Dan Ackroyd
On Tue, 29 Nov 2022 at 17:41, Derick Rethans wrote: > > I have just published a new "More Appropriate Date/Time Exceptions" RFC > > > Comments? > None of the 'Invalid serialization' errors tell the programmer who reads them what is wrong with the data. Unless the code was written in such a way

Re: [PHP-DEV] Re: [RFC][Dynamic class constant fetch]

2022-12-08 Thread Nicolas Grekas
Hi Ilija, > I'd like to propose a simple RFC to introduce looking up class > > constants by name. We have dedicated syntax for basically all other > > language constructs. This RFC aims to get rid of this seemingly > > arbitrary limitation. > > > >

[PHP-DEV] What's new in 8.2: DNF types

2022-12-08 Thread Thomas Gutbier
I think in this example the check for null can be removed. The feature is so much more useful than presented here. (https://www.php.net/releases/8.2/en.php#dnf_types)    class Foo {    public function bar((A)|null $entity) { -  if ($entity === null) { -  return null; -   

[PHP-DEV] PHP 8.2.0 Released!

2022-12-08 Thread Sergey Panteleev
The PHP development team announces the immediate availability of PHP 8.2.0. This release marks the latest minor release of the PHP language. PHP 8.2 comes with numerous improvements and new features, such as: - Readonly classes - Disjunctive Normal Form (DNF) Types - New stand-alone types: null,

[PHP-DEV] Re: [RFC][Dynamic class constant fetch]

2022-12-08 Thread Ilija Tovilo
Hi everyone > I'd like to propose a simple RFC to introduce looking up class > constants by name. We have dedicated syntax for basically all other > language constructs. This RFC aims to get rid of this seemingly > arbitrary limitation. > > https://wiki.php.net/rfc/dynamic_class_constant_fetch