Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73902 invoked from network); 28 Apr 2016 18:34:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 18:34: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 65.55.169.118 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 65.55.169.118 mail-bl2on0118.outbound.protection.outlook.com Received: from [65.55.169.118] ([65.55.169.118:8944] helo=na01-bl2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/99-28296-C9752275 for ; Thu, 28 Apr 2016 14:34:05 -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=d1qAvGDVpbAUI8dw6TM71P/FO78v6oTvl5ftFku+tW4=; b=2I0dy4WQTpB2hR7GJ2BBcbCQMsS/0G3YxUnnOkqtG2aBQMHu00MlAoWf+HlIE6/E2ReID6KGt0vg6BO1ixECH8Xb4Mh84ghellHktUN+afsSCw70KCAYsnjSOUtctoCqJzlNLsa4lETC1zjX5SvQWCljyOuyF9csNDEkOi8HT7s= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) with Microsoft SMTP Server (TLS) id 15.1.477.8; Thu, 28 Apr 2016 18:34:00 +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 18:34:00 +0000 To: Bob Weinand CC: Anatol Belski , Joe Watkins , internals , Levi Morrison Thread-Topic: [PHP-DEV] Request to withdraw RFC's for nullable types for only return values Thread-Index: AQHRoWRe782dRDYm1kuNWD0UZVTnlZ+fkd6TgAAUTgCAAAVaWoAABNwAgAAE7Fk= Date: Thu, 28 Apr 2016 18:34:00 +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: hotmail.com; dkim=none (message not signed) header.d=none;hotmail.com; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: 473fff90-26dd-49e4-bc98-08d36f93aae0 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1784;5:cdnihKEfDAqLb1z3JVmRnwpoy0Rcbq4fVLcpCVrXp2oZHcHO1D2q77PVY/7vBdiRoFXJ52uWM9/PFyMvK9bkywA/GG1Iy94v0renPBKtCpPwf6uf4Ko71ng8aBRbjv3U94TJE2Qp38hvVMqJFDwcCg==;24:lsP+pHeNa4iKBDmKcakS6p3avac6ij3Ow30wbcSRldyCAplqKlyM0+VLReSctP1BJ3So4wY2mACxklxhjNO+uOJBS8osqFCe+9zOQYwTniU=;7:yBRaWasK5V9UW6ETh0lnDr6MnDukwDyCJFPTBuCSSG2QttPOK+ZKkXynDeHRDFICnFcV2ZedJQc63uS8c7KyqNv7AifjSPcy73KpvPTUPIkcf3QGUCFEMmdDwTIjwApWIx34grQbsQouPdtKT/8IWFpkSkAqrs6etbQq3ZDHRD5a7i23XddTK57pmnxVRNX7 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; 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:BY2PR0201MB1784;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1784; x-forefront-prvs: 0926B0E013 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(16799955002)(15975445007)(106116001)(5008740100001)(2950100001)(122556002)(2900100001)(99286002)(77096005)(87936001)(19580395003)(189998001)(19580405001)(2906002)(10400500002)(11100500001)(74316001)(110136002)(76576001)(50986999)(54356999)(76176999)(3900700001)(92566002)(33656002)(4326007)(93886004)(3660700001)(3280700002)(6116002)(102836003)(586003)(1096002)(81166005)(3846002)(5004730100002)(9686002)(5003600100002)(66066001)(5002640100001)(1220700001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1784;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2016 18:34:00.4915 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1784 Subject: Re: [PHP-DEV] Request to withdraw RFC's for nullable types for only return values From: dmitry@zend.com (Dmitry Stogov) PHP method compatibility rules didn't take into account default values of a= rguments. Adding new rule is not just a bug fix, and breaks existing code. ________________________________________ From: Bob Weinand Sent: Thursday, April 28, 2016 9:12:54 PM To: Dmitry Stogov Cc: Anatol Belski; Joe Watkins; internals; Levi Morrison Subject: Re: [PHP-DEV] Request to withdraw RFC's for nullable types for onl= y return values Yeah, It's a BC break; hence I've accepted it being reverted from 7.0. I've only put the fix back in 7.1 thus. Or is it your opinion that we shall hold a formal RFC vote for a glaring bu= g? That sounds pretty much like a waste of everyones time to me. RFC votes = IMO are for cases where we don't have clear consensus. Or is really anyone = disputing this fix? Bob Weinand (iPhone) > Am 28.04.2016 um 19:59 schrieb Dmitry Stogov : > > This is a "fix", that introduces BC break. > Even if I see a reason in this check, it's still a break. > If you remember, we voted for almost for every BC break during PHP-7.0 de= velopment. > > > ________________________________________ > From: Bob Weinand > Sent: Thursday, April 28, 2016 8:36:22 PM > To: Dmitry Stogov > Cc: Anatol Belski; Joe Watkins; internals; Levi Morrison > Subject: Re: [PHP-DEV] Request to withdraw RFC's for nullable types for o= nly return values > >> Am 28.04.2016 um 18:28 schrieb Dmitry Stogov : >> >> Hi, >> >> The BC break in PHP-7.0 was introduced by commit ee9a78a033696ff9546fb1d= bfecd28f20477b511 >> >> Author: Joe Watkins >> Date: Mon Mar 28 11:54:25 2016 +0100 >> >> Late, there were few more commits that changed and moved the problematic= code. >> >> Anatol, I think we should revert this before 7.0.6 release. >> >> Thanks. Dmitry. >> >> ________________________________________ >> From: morrison.levi@gmail.com on behalf of Lev= i Morrison >> Sent: Thursday, April 28, 2016 18:40 >> To: internals >> Cc: Dmitry Stogov; Tom Worster >> Subject: Request to withdraw RFC's for nullable types for only return va= lues >> >> I have discovered through a [bug report][1] a case where having >> explicitly nullable parameters would be of value. >> >> > >> interface Foo { >> public function bar(array $baz =3D null); >> } >> >> class Hello implements Foo { >> public function bar(array $baz =3D array()) {} >> } >> >> ?> >> >> 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: >> >> > >> class Hello implements Foo { >> public function bar(array | null $baz =3D []) {} >> } >> >> ?> >> >> (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 > > Hey Dmitry, > > thanks for reverting=85 but > > I've seen you had merged just straight up? > I assume this was unintentional (as it should definitely remain fixed in = 7.1). > Thus I've reverted your changes in master (only) and added an appropriate= NEWS entry there. > > Thanks, > Bob