Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110667 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73491 invoked from network); 18 Jun 2020 17:57:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jun 2020 17:57:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 03100180211 for ; Thu, 18 Jun 2020 09:43:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 18 Jun 2020 09:43:45 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id x18so8071254lji.1 for ; Thu, 18 Jun 2020 09:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+LaFt48d8RIXKCTxi3ds5yaqvPNnP8fST/BCxDaOWrk=; b=iw2H0C5uq9VcWnXoJ8C53cA5IN8OEq5UqgUZtOTSjBtj9J8EvmbgU5bCUtRHTYx/44 3J7BA6d1clak6kviPV6ULOmwnzQntAuceT9clJyBrc3QbkhRa9HwdZLK+2ZKF9ZFLOvZ VNjmk9mYpBjGwBUjfGfB2V0f+X5I+d1pwU7bI2SQsQnAuAW4FqBD64aU2jhXR8D3VRXS wXfIVU/11/1Qc2wChBMEBldBSbWK+axMLVdWQCfujkEhZTY5bHa+JcYIl9bvz4VQpehV dod21Z7FpMn5nUNi8VXQIYwVHY1lDmGMSgAgWi67A/6oe0PY9lpg62/npDs7djCT6/OF I61A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+LaFt48d8RIXKCTxi3ds5yaqvPNnP8fST/BCxDaOWrk=; b=ARcqVYyvt71OU1fSkG9rxanEcGKs2to++P3vZgcktLQDN/qqzKXPH2bxnnnAN/aLvm XJTCYNdzYfRZXS2cHYgq55BeWgGXnD3ozguTCv1yQ+UVSxO8IsaubkoENEyHjB6QIBXf 4zpQHQqP5utUURJ/mFVUxLRYK9bIZNt/40j3ss37Y/r/9sbrRwXco66OGA8bJvApTbZD 24bPGAWb4HbtgQiPh1HLRshvDqcZfSMfskZVsuoEgf8OCJZo0HZqUqht4didzoTLANFv 4wyMsGF8Piy+llCz8IO1J3O9J+aGVzwq97+OjdumyFm5fECSHr5IMFrvaq7zJWGjYIhD O/eA== X-Gm-Message-State: AOAM532IIYN1Vlju8XVvVhXeqQLB4WbkoUdZqNL3xUgyDVjUph+e2zWN jO+vjLnJj+Uxlbk4LU6Hef81CDK9MzSNlvFKK+0= X-Google-Smtp-Source: ABdhPJwLs3g4XQGI8bUz96gNQPAEKT3IUQ3qNwSQ9oKy7cQDvg9HFH1xGf/j2RmRHafjkMmKxr5HBMwspeZXgsrzP58= X-Received: by 2002:a2e:a0ca:: with SMTP id f10mr2895956ljm.96.1592498623267; Thu, 18 Jun 2020 09:43:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 18 Jun 2020 19:43:29 +0300 Message-ID: To: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000bec9d105a85e7a37" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Make constructors and destructors return void From: benas.molis.iml@gmail.com (Benas IML) --000000000000bec9d105a85e7a37 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C4=83tr=C4=83nescu 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 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 >> >> --000000000000bec9d105a85e7a37--