Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100854 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26842 invoked from network); 10 Oct 2017 14:57:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2017 14:57:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:58170] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/78-49033-2FFDCD95 for ; Tue, 10 Oct 2017 10:57:56 -0400 Received: from [192.168.2.106] ([79.243.124.218]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LzXTy-1dFtYj10vi-014jR2 for ; Tue, 10 Oct 2017 16:57:51 +0200 To: internals@lists.php.net References: <9a3f15dd-5dfc-144b-cc5f-66f689c33f53@php.net> Message-ID: Date: Tue, 10 Oct 2017 16:57:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <9a3f15dd-5dfc-144b-cc5f-66f689c33f53@php.net> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:yCR1baCx4a8P8WnTlLERMTmT2XPxdgrR6GIqMT92+/lqKc4uBpY 48/Lx4J0+p4QArgkOAAfDgu5ZxgoxqG908jnNEy18fY8vJglQ4sm4dQr22PiRnWMtBjHvxb f6BDxFe/+E4HXcZZ7wRdOB/foGcHWvNc7hhZ7S9VlmpCW7XwZbnTCO10XHzc/xKPW0bUr6K ROVnITZRglid3yU4apqMw== X-UI-Out-Filterresults: notjunk:1;V01:K0:y/+lJiqHRMk=:fsxV0Y2Cmv1SyArYkeXqQu NaRDMAI6Gw3YSMyLhO+i1IxUACvJm8QgQVtCriaS4ROx+AMXIzKv8edfYyXmaT1UR+jYgMKmJ 09wvJPEEGM1OITxv/F9JR5fdstWI36Wz6IGNY+Xm311bvAwwZKQSbtw2hARM7l04SrcdPRC5j UDccOXKVNodH+vZFDT8TLJoKS1x8ho8U8oV9mEabczsvfLJmWvZcoztoumaJ/15q4Xzid62CA ig2xEgcAr6dAtXdRlYqnZFIvbADu44kGw0XR8wUiwbbXG2WyCflVfKaK5jgEPkA8s29Zs10v2 hctSRMaIBCxHHpSPJqALyc0ME49VX5K85lP68kIBl0/f9Xqvty8MIBneUP6HqcPkOtwTxXaOm DVJI68feP7L9rZugw/R1s+V9edwbD2+vHgMor6OE562EZs2s713W/1CRLHiF65BgBXSH1lZFc 0kagv9gM+XfcSioymRPnKckgTHfqAuuNTwGfbrLRp2ipOhsEMlKNE1A+MW8HFL2Mv93Y2UMYK YvRO9Acp/BybomF/SjWzk6pkZPV0Vk7zamPcV9uR/HLGxDFBXTe7SOhOkU2TLUPgFQ3ONWqYu Amkpg8XDmheU0QicNdgkRPMXn2Bc+MF7ellRzztTPiEq7t/gdGN+UVwUDyN9MhbI47Zc2hVCs OFnKrWJ3GBgVShdPGVKhKKVvfMbhZ51cEeWnzf8V85tOFPMxjDnCU/ZHuZJxU9OBn64IJdz4K QHP86IUnokrzKbOebRpQ3lIsId0H04a3XHX3Bf+ImKkJ8nrR0P7IwMP6s7ePb0Z+PjqvIdyJE A2IyU5Clu68QXdCsf/gnZtPzYDV0Jr6SvKcGGVECk3+cTdTRRc= Subject: Re: Strict type declarations not enforced for Reflection API invocation From: cmbecker69@gmx.de ("Christoph M. Becker") On 10.10.2017 at 15:41, Sebastian Bergmann wrote: > I consider this a serious bug that leads to unexpected, confusing problems > such as > https://github.com/sebastianbergmann/phpunit/issues/2796#issuecomment-335180273. > > I understand Nikita's point of view (see > https://github.com/php/php-src/pull/2837#issuecomment-335405067) that > changing this behavior (aka. fixing this bug) can be considered a > "non-trivial backwards compatibility break". Therefore I would like to > bring this issue to the attention of this list with this mail. This is most certainly not an *implementation* bug. The RFC which introduced strict typing[1] states: | By default, all PHP files are in weak type-checking mode. And later: | This proposal takes the standpoint that it's up to the caller to | decide how functions should be called. | […] | Therefore, this proposal does not allow internal developers to | “opt-in” to strict typing. In case of bug #75345 the caller is a method of ReflectionFunction, which is defined in weak type-checking mode. One may argue that this is a *design* bug, but after nearly two years of PHP 7 there may be a lots of code relying on the current behavior, so in my opinion changing the behavior could not really be regarded as fixing a bug. [1] -- Christoph M. Becker