Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46094 invoked from network); 28 Apr 2016 17:29:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 17:29:06 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.110.110 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.110.110 mail-bn1on0110.outbound.protection.outlook.com Received: from [157.56.110.110] ([157.56.110.110:8764] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/73-28296-F5842275 for ; Thu, 28 Apr 2016 13:29:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3z9J3RRoeSbqTgHqrbj6RL0LXIiy/BlRfOnrFL/YV9E=; b=Q/aDOFIPNceFcHh8v0RcGsdkudY48F913nVliIOeIsUi8x/ZK1jBsvz1LOpzPJXveaGHAK2TKx3pMoJ5fLmgC+7M5njTA8T0+2cUal+EMyeOOE41FPOIWKujnZNJ72xT0U7lBwNgUm/Pwtx2gD57VqpoGJ5lfuvGeL+tLoJnTdg= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1781.namprd02.prod.outlook.com (10.163.72.23) with Microsoft SMTP Server (TLS) id 15.1.477.8; Thu, 28 Apr 2016 17:28:59 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0477.012; Thu, 28 Apr 2016 17:28:59 +0000 To: Joe Watkins CC: Levi Morrison , internals , "Tom Worster" Thread-Topic: Request to withdraw RFC's for nullable types for only return values Thread-Index: AQHRoWRe782dRDYm1kuNWD0UZVTnlZ+fm7+pgAAF6QCAAAEy1Q== Date: Thu, 28 Apr 2016 17:28:59 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: pthreads.org; dkim=none (message not signed) header.d=none;pthreads.org; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: 1c785b1d-55aa-4731-0aff-08d36f8a95b9 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1781;5:XqXngpsC+eTqIEC+EfxWk0duiotPPf/Km7XxoI6mX32uYNcelAg3pfENeZwdXyY5Z+wGmxujg7l+wlHI0EK2T9A8WFCdOi4ryj/XC0IbFpSm11kj5s6MWXKGPuhoO2sFPofAPOvY3SgIijF2zC03/A==;24:BwpFJw/PrBX39fij6PbC4iC8uZbCZ/JfJjtorxpZoJ1Hh1y8WJrL0PzynouOiuSMR3t5XNPh/92YI3e7YoZYZmBgukK/GSR76+agVBfuefI=;7:ejs4mTZ1UydmFGh3uF5Q2esEeXg0O+0rPgA+oq6/b2Oq2PV1ZD1SQJ0XxIQvH3O2Ehq753dYYfVoHKwm9lHfPW7nyBxKaYjKSMcYnarhXp2lBN0FbK2s1MdRsOPRoLWuyEyFmnWv2Xz3T/i5iZ+XlLnDmQLQNOmDPDTi3g55+0yS+ygVwo9kntu9g/DB+7nV x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BY2PR0201MB1781;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-forefront-prvs: 0926B0E013 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(24454002)(377454003)(189998001)(110136002)(15975445007)(2900100001)(77096005)(2950100001)(81166005)(76176999)(2906002)(66066001)(33656002)(3280700002)(5008740100001)(76576001)(16236675004)(122556002)(86362001)(19625215002)(1096002)(92566002)(5004730100002)(16799955002)(19580395003)(19580405001)(87936001)(11100500001)(102836003)(3846002)(1220700001)(3660700001)(586003)(106116001)(6116002)(5003600100002)(4326007)(50986999)(19627405001)(74316001)(99286002)(19617315012)(5002640100001)(54356999)(10400500002)(9686002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1781;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB178486D1A9DE2D597C522289BF650BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2016 17:28:59.5286 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1781 Subject: Re: Request to withdraw RFC's for nullable types for only return values From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB178486D1A9DE2D597C522289BF650BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable hi Joe, No problem, great it's fixed before 7.0.6 release. I think this change might be introduced only together with nullable or unio= n types. Otherwise it makes a problem, described by Levi, that doesn't allow running= the same code in PHP-7.0 and 7.1, and even doesn't allow an ease fix. Thanks. Dmitry. ________________________________ From: Joe Watkins Sent: Thursday, April 28, 2016 8:20:12 PM To: Dmitry Stogov Cc: Levi Morrison; internals; Tom Worster Subject: Re: Request to withdraw RFC's for nullable types for only return v= alues Evening Dmitry, This was discussed at length with bob, and I think nikita also, it seemed l= ike a bug fix rather than a feature. Happy for it to be moved into 7.1 ... sorry for dropping the ball there ... Cheers Joe On Thu, Apr 28, 2016 at 6:07 PM, Dmitry Stogov > wrote: Thanks for catching the BC break. Fortunately, we didn't release 7.0.6 with this problem. I see some sense in introducing that check, but changing behaviour requires= RFC and definitely not allowed in minor versions. I'm not going to withdraw https://wiki.php.net/rfc/nullable_return_types It doesn't prohibit usage of nullable for arguments, and even sets addition= al question. Thanks. Dmitry. ________________________________________ From: morrison.levi@gmail.com > on behalf of Levi Morrison > Sent: Thursday, April 28, 2016 6:40:59 PM To: internals Cc: Dmitry Stogov; Tom Worster Subject: Request to withdraw RFC's for nullable types for only return value= s I have discovered through a [bug report][1] a case where having explicitly nullable parameters would be of value. You can theoretically change the default value in a sub-type, but in this case moving away from the default value of null breaks because the subtype no longer permits null. It is important to realize that we previously *allowed* this behavior since PHP 5.1 but was fixed in 7.0.6. If instead we had nullable types separately from default values of null this could change to: (or a short-form `?array $baz =3D []` if short-form passes) This preserves the ability to be null but changes the default value. Of course, there may be other code changes necessary to future-proof their code but there current code would now work without having to rewrite any method bodies (just signatures). In light of this I kindly request that RFCs that add nullable types for only return values be withdrawn. So that [Union Types][2] and [Nullable Types][3] can go forward unhindered. [1]: https://bugs.php.net/bug.php?id=3D72119 [2]: https://wiki.php.net/rfc/union_types [2]: https://wiki.php.net/rfc/nullable_types --_000_BY2PR0201MB178486D1A9DE2D597C522289BF650BY2PR0201MB1784_--