Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Larry Garfield
On Sat, Apr 24, 2021, at 2:55 PM, Olle Härstedt wrote: > 2021-04-24 21:51 GMT+02:00, Marco Pivetta : > > On Sat, Apr 24, 2021, 21:44 Olle Härstedt wrote: > > > >> 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : > >> >> Doesn't this violate the principle: It should be possible to add new > >> >>

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread David Gebler
I don't love this idea, I'm not very fond of the final keyword, either; I've always believed annotations (or attributes in PHP these days) are a better of way of indicating you, as an author of a class, did not write it with inheritability in mind or intended than restricting language features

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-04-24 Thread tyson andre
Hi Marco Pivetta, > > In fact, if reflection were to switch to the actual runtime return types of > > those methods, I don't see a reason why downstream consumers would break > > (stubbing tools, code generators, type checkers, dependency solvers, etc.) > > If the published library/application

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Christian Schneider
Am 24.04.2021 um 21:51 schrieb Marco Pivetta : > On Sat, Apr 24, 2021, 21:44 Olle Härstedt > wrote: > >> 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : Doesn't this violate the principle: It should be possible to add new features without touching old

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Olle Härstedt
2021-04-24 21:51 GMT+02:00, Marco Pivetta : > On Sat, Apr 24, 2021, 21:44 Olle Härstedt wrote: > >> 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : >> >> Doesn't this violate the principle: It should be possible to add new >> >> features without touching old code? >> > >> > This depends on which

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Marco Pivetta
On Sat, Apr 24, 2021, 21:44 Olle Härstedt wrote: > 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : > >> Doesn't this violate the principle: It should be possible to add new > >> features without touching old code? > > > > This depends on which syntax is picked, both `for` and attribute syntax >

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Olle Härstedt
2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : >> Doesn't this violate the principle: It should be possible to add new >> features without touching old code? > > This depends on which syntax is picked, both `for` and attribute syntax will > be completely BC. I'm not talking about BC, but the

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-04-24 Thread Marco Pivetta
Hey Tyson, On Sat, Apr 24, 2021, 19:24 tyson andre wrote: > Hi Marco Pivetta, > > > In fact, if reflection were to switch to the actual runtime return types > of > > those methods, I don't see a reason why downstream consumers would break > > (stubbing tools, code generators, type checkers,

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Ilija Tovilo
Hi Saif On Sat, Apr 24, 2021 at 1:35 PM Saif Eddin Gmati wrote: > > Hello Internals, > > I'm sending this email to open discussion about sealed classes, interfaces, > and traits feature for PHP 8.1. > > I have create a Draft RFC here: https://wiki.php.net/rfc/sealed_classes > > A major concern

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

2021-04-24 Thread Rowan Tommins
On 22/03/2021 09:24, Nikita Popov wrote: It's time for another deprecation RFC: https://wiki.php.net/rfc/deprecations_php_8_1 I have added another proposal to this list: the 'ssl_method' option to the SoapClient constructor, which in practice only allows you to force use of SSLv3. A more

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-04-24 Thread tyson andre
Hi Marco Pivetta, > In fact, if reflection were to switch to the actual runtime return types of > those methods, I don't see a reason why downstream consumers would break > (stubbing tools, code generators, type checkers, dependency solvers, etc.) If the published library/application had to

Re: [PHP-DEV] [RFC] Add IntlDateTimePatternGenerator

2021-04-24 Thread Mel Dafert
> For both points, I'd say "consistency wins by default." So if the other > classes in that package already skip "Time" and > use ::create() instead of a constructor, you should do the same as well > unless there's a very good reason not to. The problem with ::create is that in the intl

Re: [PHP-DEV] [RFC] Add IntlDateTimePatternGenerator

2021-04-24 Thread Larry Garfield
On Sat, Apr 24, 2021, at 10:12 AM, Mel Dafert wrote: > Hi Internals, > > I would like to propose an RFC > https://wiki.php.net/rfc/intldatetimepatterngenerator to add > IntlDateTimePatternGenerator > which exposes ICU's ability to flexibly create localized date/time > formatting patterns from

Re: [PHP-DEV] Re: [RFC][Draft] Sealed Classes

2021-04-24 Thread Larry Garfield
On Sat, Apr 24, 2021, at 6:00 AM, Saif Eddin Gmati wrote: > A major behavior i wanted to discuss is how should sealed interfaces > work, and specially around `Throwable` which is currently sealed to > only `Error` and `Exception`, but allows other interfaces to extend it, > and other classes to

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Saif Eddin Gmati
> Doesn't this violate the principle: It should be possible to add new features > without touching old code? This depends on which syntax is picked, both `for` and attribute syntax will be completely BC. using `sealed`+`permits` or `permits` only will result in these keywords being

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Olle Härstedt
2021-04-24 12:56 GMT, Pierre : > Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : >> Hello Internals, >> >> I'm sending this email to open discussion about sealed classes, >> interfaces, and traits feature for PHP 8.1. >> >> I have create a Draft RFC here: >>

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Saif Eddin Gmati
personally I'm okay with using an attribute, but using a keyword for type system related features seems like a better fit. I have added it to the alternative syntax list, which would have a separate vote. https://wiki.php.net/rfc/sealed_classes#syntax On Sat, 24 Apr 2021

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Matthew Brown
> On Apr 24, 2021, at 10:43 AM, Levi Morrison via internals > wrote: > > On Sat, Apr 24, 2021 at 8:04 AM Benjamin Eberlei wrote: >> >>> On Sat, Apr 24, 2021 at 2:56 PM Pierre wrote: >>> >>> Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : Hello Internals, I'm sending

[PHP-DEV] [RFC] Add IntlDateTimePatternGenerator

2021-04-24 Thread Mel Dafert
Hi Internals, I would like to propose an RFC https://wiki.php.net/rfc/intldatetimepatterngenerator to add IntlDateTimePatternGenerator which exposes ICU's ability to flexibly create localized date/time formatting patterns from a skeleton. Previous discussion:

[PHP-DEV] Re: [RFC][Draft] Sealed Classes

2021-04-24 Thread Saif Eddin Gmati
A major behavior i wanted to discuss is how should sealed interfaces work, and specially around `Throwable` which is currently sealed to only `Error` and `Exception`, but allows other interfaces to extend it, and other classes to implement it as long as they extend `Error` or `Exception` ( or

[PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Saif Eddin Gmati
Hello Internals, I'm sending this email to open discussion about sealed classes, interfaces, and traits feature for PHP 8.1. I have create a Draft RFC here: https://wiki.php.net/rfc/sealed_classes A major concern for few people have been the syntax, in which it introduces 2 new keywords into

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Levi Morrison via internals
On Sat, Apr 24, 2021 at 8:04 AM Benjamin Eberlei wrote: > > On Sat, Apr 24, 2021 at 2:56 PM Pierre wrote: > > > Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : > > > Hello Internals, > > > > > > I'm sending this email to open discussion about sealed classes, > > > interfaces, and traits

[PHP-DEV] Re: Request for RFC karma

2021-04-24 Thread Christoph M. Becker
On 24.04.2021 at 16:01, Mel Dafert wrote: > I would like to request wiki karma to create an RFC for > IntlDateTimePatternGenerator (see https://github.com/php/php-src/pull/6771). > > My wiki account name is deltragon. RFC karma granted. Best of luck with the RFC! :) -- Christoph M. Becker --

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Benjamin Eberlei
On Sat, Apr 24, 2021 at 2:56 PM Pierre wrote: > Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : > > Hello Internals, > > > > I'm sending this email to open discussion about sealed classes, > > interfaces, and traits feature for PHP 8.1. > > > > I have create a Draft RFC here: > >

[PHP-DEV] Request for RFC karma

2021-04-24 Thread Mel Dafert
Hello, I would like to request wiki karma to create an RFC for IntlDateTimePatternGenerator (see https://github.com/php/php-src/pull/6771). My wiki account name is deltragon. Thanks, Mel Dafert -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Pierre
Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : Hello Internals, I'm sending this email to open discussion about sealed classes, interfaces, and traits feature for PHP 8.1. I have create a Draft RFC here: https://wiki.php.net/rfc/sealed_classes

[PHP-DEV] [RFC][Draft] Sealed Classes

2021-04-24 Thread Saif Eddin Gmati
Hello Internals, I'm sending this email to open discussion about sealed classes, interfaces, and traits feature for PHP 8.1. I have create a Draft RFC here: https://wiki.php.net/rfc/sealed_classes A major concern for few people have been the syntax, in which it introduces 2 new keywords into