Re: [RFC] [DISCUSSION] Make constructors and destructors return void

From: Date: Thu, 18 Jun 2020 16:43:29 +0000
Subject: Re: [RFC] [DISCUSSION] Make constructors and destructors return void
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-110667@lists.php.net to get a copy of this message
Hey Alexandru, Your email was marked as spam for me, thus this is a late response, sorry about that! Nikita analyzed top 2,000 Composer packages and found that 95 of them will have a BC break. As a solution, to minimize the amount of BC breaks, I'm proposing to have a deprecation warning in PHP 8.0 and subsequently enforce void rules in later versions. Best regards, Benas On Wed, Jun 17, 2020, 3:44 AM Alexandru Pătrănescu <drealecs@gmail.com> wrote: > Hi Benas, > > This looks good to me. > > Can you do a research on top 1k-2k most used composer packages and verify > how small the BC break it is? > > Also, a suggestion on how to fix the BC issue if it exists could be > mentioned I guess. > > Thank you, > Aled > > On Wed, Jun 17, 2020, 02:11 Benas IML <benas.molis.iml@gmail.com> wrote: > >> Hey internals, >> >> This is a completely refined, follow-up RFC to my original RFC. Based on >> the >> feedback I have received, this PR implements full validation and >> implicitly >> enforces void rules on constructors/destructors while also >> allowing to >> declare an **optional** explicit void return type. Note, >> that there is a >> small but justifiable BC break (as stated by the RFC). >> >> RFC: https://wiki.php.net/rfc/make_ctor_ret_void >> >> Best regards, >> Benas Seliuginas >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: https://www.php.net/unsub.php >> >>

« previous php.internals (#110667) next »