Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95375 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97071 invoked from network); 22 Aug 2016 14:21:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 14:21:52 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:36985] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/E8-35246-F7A0BB75 for ; Mon, 22 Aug 2016 10:21:51 -0400 Received: by mail-wm0-f51.google.com with SMTP id i5so147270125wmg.0 for ; Mon, 22 Aug 2016 07:21:51 -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=WOhjgsds9LVUTVbG65+Eb+GI2ArF4DJQiox1GbWHVRw=; b=Hi1e81NwofqJT8NSkmi6LAlZkb5P1yYMOpMFlIpbCCOAH/gNItIayWLEMNrs2QuSVt lQBjrdsWco8ealxp5zwvlWKYW08nIYD69/vBeNZBHtTdv+f7QoBLcG9hNCn0G7s2cpNk cKk7cgEL5Qg9gbqeVdbbZCvZge6SHa/ISk3vyulaPRSSwd7UCvvtZ0fVT59EXFwmU1b+ OuFELSFkuYnvI1bUY8arc5SFZxyGg2ZTPTJql5+ayN1nDiw486o0h7+tc++BcDZiT//D PNKREwzX8VdnHOdyFD1h/uJWn6Jn6sK9Jh4jZNi1yaXvpza5Qmeq5nrDkvcAOQZyPDaV eMXw== 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=WOhjgsds9LVUTVbG65+Eb+GI2ArF4DJQiox1GbWHVRw=; b=GlnvLBFP1Ef60WTEPombu/HnaiwCRh91uIbzmcWtnyjQdVzpx6XD7QiJsZ8E0AhFS9 uXI5ahWqfjAfQTfr8GfZJxaEldsDI9NcXFu+AXSukr7ByY9hgNJJCjHVWHXeGYhwy0bJ Sn4o/dyibaHmCB9QxdQter3Vun4QxjhJBfh1yvOKnNtWULQT9dysQuZooGVQXM535iTg TWrDBpGaKEFCXNYiQjNmdzmM/BZAdChV0I88zdYTJQ5cepfBMtsYPiaXPwEZBe3Yq/Gm tdI2qJV6Mnl6N8T3a4SiRAdT4BHqslMOK3iytfsRmjdLYrkQnVv9WEFLy5P846cYUjx3 qLDg== X-Gm-Message-State: AEkoouvpyZ/nwBHwLlSKQ7LukDKOo/19tC3KfliGflMDT7FlXbhtbtSihQUOZNsvkUtTKanJqulf/0LUmZ4SHg== X-Received: by 10.195.12.115 with SMTP id ep19mr17568865wjd.80.1471875708453; Mon, 22 Aug 2016 07:21:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.161.45 with HTTP; Mon, 22 Aug 2016 07:21:47 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 16:21:47 +0200 Message-ID: To: Pierre Joye Cc: Levi Morrison , Davey Shafik , Joe Watkins , PHP internals , Nicolas Grekas Content-Type: multipart/alternative; boundary=047d7bfd0bfcc192ae053aa9c40d Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given From: tyra3l@gmail.com (Ferenc Kovacs) --047d7bfd0bfcc192ae053aa9c40d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Aug 22, 2016 at 4:16 PM, Pierre Joye wrote: > 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 on= e > > > 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 clas= s > > (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 > Hi, If it was explicitly documented to be expecting an object, then altering the code to match the documented behavior can be considered a bugfix, but I agree that if it is moderately/widely used we should consider keeping the old behavior instead of removing it in a minor version. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7bfd0bfcc192ae053aa9c40d--