Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-03 Thread Mark Niebergall
Máté, Benas, Internals, On Fri, Feb 3, 2023 at 7:34 AM Máté Kocsis wrote: > Hi Alexandru, Mark, > > > > 1. Why is object type not supported? I can't see a real reason and also > > there is no explanation why. > > > > Sorry for this, mentioning object as unsupported was an artifact from the > ori

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Thomas Krüger
Hi, why not using the existing Typescript programming language and transpile it to PHP? :) There are community examples for doing that: "ts2php" https://www.npmjs.com/package/ts2php Maybe creating an own PHP transpiler for Typescript written in pure PHP (community friendly) would be an alter

Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-03 Thread Claude Pache
> Le 31 janv. 2023 à 22:01, Máté Kocsis a écrit : > > > Please find the updated RFC here: > https://wiki.php.net/rfc/typed_class_constants. > > Regards, > Máté Hi, The RFC states that it is technically not possible to have a constant of effective type `static` or `self`. While this is pro

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Rowan Tommins
On 3 February 2023 18:30:00 GMT, "Olle Härstedt" wrote: >You'd have to rewrite Psalm or Phpstan in C if you want it to be part >of php-src. Or write a completely new project. I don't think that's necessarily true. There are already tools like run-tests written in PHP and shipped with php-src, PE

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Olle Härstedt
2023-02-03 17:38 GMT+01:00, Flávio Heleno : > On Fri, Feb 3, 2023 at 6:19 AM Olle Härstedt > wrote: > >> 2023-02-02 15:19 GMT+01:00, someniatko : >> > Hi Internals >> > >> > The main gist: >> > -- >> > >> > I suggest to introduce an official type-checker / static analyser / >> > prepro

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Flávio Heleno
On Fri, Feb 3, 2023 at 6:19 AM Olle Härstedt wrote: > 2023-02-02 15:19 GMT+01:00, someniatko : > > Hi Internals > > > > The main gist: > > -- > > > > I suggest to introduce an official type-checker / static analyser / > > preprocessor / transpiler for PHP, somewhat similar to TypeScri

Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-03 Thread Flávio Heleno
On Fri, Feb 3, 2023 at 11:34 AM Máté Kocsis wrote: > Hi Alexandru, Mark, > > > > 1. Why is object type not supported? I can't see a real reason and also > > there is no explanation why. > > > > Sorry for this, mentioning object as unsupported was an artifact from the > original version of the RFC

Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-03 Thread Máté Kocsis
Hi Alexandru, Mark, > 1. Why is object type not supported? I can't see a real reason and also > there is no explanation why. > Sorry for this, mentioning object as unsupported was an artifact from the original version of the RFC which was created back then when constants couldn't be objects. Aft

[PHP-DEV] PHP 8.1.15 Released

2023-02-03 Thread Patrick ALLAERT
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 The PHP development team announces the immediate availability of PHP 8.1.15. This is a bugfix release. All PHP 8.1 users are encouraged to upgrade to this version. For source downloads of PHP 8.1.15 please visit our downloads page. Windows binaries

Re: [PHP-DEV] Official Preprocessor

2023-02-03 Thread Olle Härstedt
2023-02-02 15:19 GMT+01:00, someniatko : > Hi Internals > > The main gist: > -- > > I suggest to introduce an official type-checker / static analyser / > preprocessor / transpiler for PHP, somewhat similar to TypeScript in > the JavaScript world, which will allow to introduce the featur