Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36355 invoked from network); 10 Oct 2017 16:41:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2017 16:41:51 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.218 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.218 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.218] ([81.169.146.218:30579] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/D9-49033-B48FCD95 for ; Tue, 10 Oct 2017 12:41:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1507653704; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=SdYXKhz+M3xsxehASsiq57xcsgMdXggUBONKAywDpFw=; b=TNhGwv5/Nc74x8BSxyD2e0qKAXZ9uWpP326U8AMRYeX7QhlaF0xt0ZJgp3mmFxrHVJ n6mlN2Q881ttcDNH81SkuYLNw5TwxlhPy+zEkz2la1pl4UxnvZVKGLew7rjLRDMuTQ8v CaJ1GXrc7V0aSs66e14YTolwvEDoW6YjXtAgc= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mlsGbEv0XHBzMIJSS+jKTzde5mDb8AaBAcZiAqcA== X-RZG-CLASS-ID: mo00 Received: by mail-qt0-f176.google.com with SMTP id k31so17720512qta.6 for ; Tue, 10 Oct 2017 09:41:43 -0700 (PDT) X-Gm-Message-State: AMCzsaUJJ3X3C2tc/kLNhKRU/jRcvUl/NrdbycN8kOFCm+X7cy5uPlR4 uySEJ7ZLsmaE7KdoGUg1G+I7nYqIloyOWz0c+xI= X-Google-Smtp-Source: AOwi7QDD7dphGcjYGAwzr0b3x+LoMsIIy45DPIMYvlHYRpxK4mXjAspInmB2fY19i7MTdPpFW5m/u3lZzzXCkxkZhgY= X-Received: by 10.13.205.7 with SMTP id p7mr2529847ywd.123.1507653703258; Tue, 10 Oct 2017 09:41:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.252.24 with HTTP; Tue, 10 Oct 2017 09:41:42 -0700 (PDT) In-Reply-To: References: <9a3f15dd-5dfc-144b-cc5f-66f689c33f53@php.net> Date: Tue, 10 Oct 2017 18:41:42 +0200 X-Gmail-Original-Message-ID: Message-ID: To: "lists@rhsoft.net" Cc: PHP Internals Content-Type: multipart/alternative; boundary="001a114e6eb46d7392055b33fb3e" Subject: Re: [PHP-DEV] Re: Strict type declarations not enforced for Reflection API invocation From: me@kelunik.com (Niklas Keller) --001a114e6eb46d7392055b33fb3e Content-Type: text/plain; charset="UTF-8" 2017-10-10 17:10 GMT+02:00 lists@rhsoft.net : > > Am 10.10.2017 um 16:57 schrieb 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. >> > > yes but the file in question has strict-types enabled > declare(strict_types=1); Yes, but `array_map` also uses weak types for the callback, like any other internal function call. But `call_user_func` is also special-cased, maybe we should do the same with the reflection calls. All in all, two typing modes were a bad idea to begin with, mostly because nobody payed attention to callbacks. Regards, Niklas --001a114e6eb46d7392055b33fb3e--