Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92884 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61320 invoked from network); 28 Apr 2016 17:48:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 17:48:56 -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.137 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.110.137 mail-bn1on0137.outbound.protection.outlook.com Received: from [157.56.110.137] ([157.56.110.137:21952] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/F6-28296-50D42275 for ; Thu, 28 Apr 2016 13:48:55 -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=2MPTRjQ1KshbCM3wn5eyx6f63nzPA28EtaBGA0ID3Sg=; b=u38i3K/7FvZcYRvf7TboU30I1HxBxSakJ9huK/9nUzU8PXEPUB7QUnVxwyRZnm/RzkB+ob8u4wODEEQVl118oZ3Y7hP44dyMAO8FJOmgvYI3QZVj6uOUFj62Gi57h619hiHBuaieXisl1ZNZvyt780tRmDeChhrAPmOpaq/AdGU= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1782.namprd02.prod.outlook.com (10.163.72.24) with Microsoft SMTP Server (TLS) id 15.1.477.8; Thu, 28 Apr 2016 17:48:50 +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:48:50 +0000 To: Joe Watkins , Bob Weinand CC: Anatol Belski , internals , "Levi Morrison" Thread-Topic: [PHP-DEV] Request to withdraw RFC's for nullable types for only return values Thread-Index: AQHRoWRe782dRDYm1kuNWD0UZVTnlZ+fkd6TgAAUTgCAAAF0AIAAANSJ Date: Thu, 28 Apr 2016 17:48:50 +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: ec7c0024-5c52-4230-84e7-08d36f8d5b35 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1782;5:IY4gdluMc1PgMWRVA3QD4Csay1oR8AoYjibhXSNmI2H/eIYLG7Jb+wNGflZ/7MK3oPYCGMbVH47kukziRMVbbbYgCJZpT2itUlfnW98tlg3a/D691GSH2z4EMsprizKUcbc54E7SbfHpaoSuy+me9g==;24:mqTJIfYXu4bj072jMzZDSDvAk3eHuFaTChzWzoWaq1nTS2VuTcVQLs50ITDG+8BemrsB3lFJaxTfRPOJSsdfaFaXYBZ/Bq7zeaCrbRp5BEY=;7:T1/bSMY2c1xyhKoWlMSpkucVQhXuC3K3WpEM6uWJSsA7Fl/z1km4WOawtnnFbyrw+OiV2iaf+nDMspELln/e3KWoTNIqjsvDHS7DidxEttIBvPUQhpNQ1Er0AQPq1ogBjYBEBkyq57lxc3aibXURambxUoPdr0qgNutUAufPT3FLC798G/Mbbe1eYzQItSM1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; 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)(3002001)(10201501046);SRVR:BY2PR0201MB1782;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-forefront-prvs: 0926B0E013 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(377454003)(24454002)(189998001)(2906002)(99286002)(19627405001)(5004730100002)(2900100001)(81166005)(5001770100001)(5002640100001)(66066001)(2950100001)(586003)(19617315012)(87936001)(74316001)(10400500002)(9686002)(19580405001)(106116001)(3660700001)(5008740100001)(19580395003)(3280700002)(3900700001)(4326007)(3846002)(19625215002)(1220700001)(77096005)(15975445007)(16236675004)(86362001)(102836003)(76576001)(5003600100002)(11100500001)(33656002)(122556002)(16799955002)(50986999)(76176999)(54356999)(1096002)(93886004)(6116002)(92566002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1782;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB1784938EAF870F2F45CF0CC8BF650BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2016 17:48:50.0209 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1782 Subject: Re: [PHP-DEV] Request to withdraw RFC's for nullable types for only return values From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB1784938EAF870F2F45CF0CC8BF650BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable all these are good points not to commit BC breaks in hurry. ________________________________ From: Joe Watkins Sent: Thursday, April 28, 2016 8:41:34 PM To: Bob Weinand Cc: Dmitry Stogov; Anatol Belski; internals; Levi Morrison Subject: Re: [PHP-DEV] Request to withdraw RFC's for nullable types for onl= y return values The problem is as Levi explained though Bob, don't we actually require null= ables/unions for that case ? Maybe we can move forward now, confident that by the time 7.1 is released w= e will have one of those things ? The problems with that are, the RFC's for unions/intersections don't match = the implementation, and none of us have a good idea how to implement the RF= Cs. In addition, nobody can agree which nullable types RFC should go to vote, o= r how the whole nullable type question should be resolved. Cheers Joe On Thu, Apr 28, 2016 at 6:36 PM, Bob Weinand > wrote: > Am 28.04.2016 um 18:28 schrieb Dmitry Stogov >: > > Hi, > > The BC break in PHP-7.0 was introduced by commit ee9a78a033696ff9546fb1db= fecd28f20477b511 > > 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 Levi Morrison <= levim@php.net> > 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 val= ues > > 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... 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 N= EWS entry there. Thanks, Bob --_000_BY2PR0201MB1784938EAF870F2F45CF0CC8BF650BY2PR0201MB1784_--