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

From: Date: Thu, 18 Jun 2020 11:47:09 +0000
Subject: Re: [RFC] [DISCUSSION] Make constructors and destructors return void
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-110650@lists.php.net to get a copy of this message
Hey internals, 1. Since there is confusion around multiple RFCs, I would like to emphasize that this RFC (Make constructors and destructors return void) superseded the original RFC (Allow void return type on constructors/destructors). Thus, the latter RFC is now abandoned. Link to the new RFC: https://wiki.php.net/rfc/make_ctor_ret_void Link to the old RFC: https://wiki.php.net/rfc/constructor_return_type I would also like to inform you that the new RFC is now complete. As such, I have put the RFC into "Under Discussion" status. 2. Since this RFC is proposing a rather small BC break (given that there will be a deprecation warning in PHP 8.0), should we start enforcing void rules on constructors and destructors in PHP 8.1 or PHP 9.0? Best regards, Benas On Wed, Jun 17, 2020, 2:10 AM 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 >

« previous php.internals (#110650) next »