Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95374 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95465 invoked from network); 22 Aug 2016 14:16:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 14:16:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.45 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.218.45 mail-oi0-f45.google.com Received: from [209.85.218.45] ([209.85.218.45:33640] helo=mail-oi0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/88-35246-D490BB75 for ; Mon, 22 Aug 2016 10:16:47 -0400 Received: by mail-oi0-f45.google.com with SMTP id c15so152327304oig.0 for ; Mon, 22 Aug 2016 07:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DWxSvR7URQntMtoSuSA2W9LceQVZ9C2bLzRtuNgls2Q=; b=qosxLVKLQBEIoiHAjocRL/TJqsy1Bq3OY3a/UTskuRXDP4T6TECuYjJS4G64y4dGlE jtvnVdLgk0g44f1NE/TOhXr8zEneqy1J+6lMyy2LwRhaRDf62jRxnfrohESpH+eW+hFf C/u1X4F+BpwzPE1NtNVCqGBpXUVPtsS4hWDX8ReXzrKhiG02/3wPRuwTFTWahcgIE0xN Dt2B/IM9TwnwWWZTO4MNNhKJCJ4b5RZHOVj5iJ0abRD0/ZL2EWMuyKzCRjLK/DrHBOld Ik39Zv9Orme2CVB2qmKZfBHfIQHDNY/TKHY288BuXyvUFUBKqLX3RMkwwzAxYo1AbeTt X9nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DWxSvR7URQntMtoSuSA2W9LceQVZ9C2bLzRtuNgls2Q=; b=gOhfzKomgxih96i5AF0luYxOjUMHVNDisnynCY2k42Y3HHmBPlzYlqBMp+hRz6HLbS dKZa6fyIVc7LNKSIneQv6z6veXe0E7DBui537tJpDQKDb04eipmPb31kTSdCSm3IMcDq ZSESef1kT3ntKOYj2d5ddH76ne21+q2GphPqdgCd7b8c/uo3DgzMC98J22hVqHZaMdom t/u7BJhUIHQJzEdFCaUnJgUn3hhZDGoLk8aLKJQCr/ApWr2cGwRhekjEMfnbR/zFjhPO UYl9880yhQVyxnE99zy5QeINh0/bVO9K2K30ewolVZH0rmOPN7Sh75n/+O+ftpuS6laT x/0A== X-Gm-Message-State: AEkoouusz6kvMETte7/t/pac/nh8hzXmtT80LtyqYimh/lwsFQCCG0EtuHs6kiQ8KiHwg6j4hm+duAv0mXt/7g== X-Received: by 10.202.105.139 with SMTP id e133mr13020834oic.33.1471875402320; Mon, 22 Aug 2016 07:16:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.53.135 with HTTP; Mon, 22 Aug 2016 07:16:40 -0700 (PDT) Received: by 10.202.53.135 with HTTP; Mon, 22 Aug 2016 07:16:40 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 21:16:40 +0700 Message-ID: To: Levi Morrison , Davey Shafik , Joe Watkins Cc: PHP internals , Nicolas Grekas Content-Type: multipart/alternative; boundary=001a114133bc825319053aa9b293 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given From: pierre.php@gmail.com (Pierre Joye) --001a114133bc825319053aa9b293 Content-Type: text/plain; charset=UTF-8 On Aug 22, 2016 9:01 PM, "Levi Morrison" wrote: > > On Mon, Aug 22, 2016 at 5:17 AM, Nicolas Grekas < > nicolas.grekas+php@gmail.com> wrote: > > > Hello, > > > > now that the BC break on ReflectionType has been reverted, another one > > remains in ReflectionMethod::invoke(): > > > > the method doesn't accept a string as first argument anymore, see e.g.: > > > > https://3v4l.org/pImmv > > > > As you can see, this worked since 5.0 and even in HHVM. > > > > It would be great to fix this BC break please. > > > > Regards, > > Nicolas > > > > According to the [documentation][1] it requires an object. If the > documentation has not been altered recently to make it this way then I'm > inclined to keep the backward compatibility break. Your example uses a > static method - you should be passing null and not the name of the class > (this is also in the documentation). > > [1]: http://php.net/manual/en/reflectionmethod.invoke.php I have to disagree here. Many codes out there uses string. What is the appealing reason to break these codes in 7.1? I think it should restore the precious behavior and if the docs need a fix, let fix it, not the other way. Cheers Pierre --001a114133bc825319053aa9b293--