Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99219 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76524 invoked from network); 28 May 2017 21:33:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2017 21:33:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:24383] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/C0-03918-6224B295 for ; Sun, 28 May 2017 17:33:27 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3wbY5H2XMTzXMk for ; Sun, 28 May 2017 23:33:23 +0200 (CEST) To: internals@lists.php.net References: <8de6a2ef-9602-e489-f19c-001005626b87@gmail.com> Message-ID: Date: Sun, 28 May 2017 23:33:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Parameter type widening RFC From: lists@rhsoft.net ("lists@rhsoft.net") Am 28.05.2017 um 23:28 schrieb Dan Ackroyd: > On 28 May 2017 at 18:06, Aidan Woods wrote: >> So, if I understand everything here correctly >> ... >> will be equivalent in 7.2? :( >> > > Not equivalent. Adding the Boo param type to an implementation, when > it is only a comment in the parent gives an error. > > interface Foo > { > /* > * @param $Boo, pretty please accept type Boo here > */ > public function bar( $Boo); > } > > class Zot implements Foo { > public function bar(Boo $Boo) {} > } > > Fatal error: Declaration of Zot::bar(Boo $Boo) must be compatible with > Foo::bar($Boo) in %s on line %d all these things should be just warnings instead fatal errors no matter if we talk about params or return-types simply because any sane code over years had types in the doc-block comments and now with throw fatal errors you just make it only harder move that comment hints to code