On Mon, Aug 22, 2016 at 4:16 PM, Pierre Joye <pierre....@gmail.com> wrote:
> On Aug 22, 2016 9:01 PM, "Levi Morrison" <le...@php.net> wrote: > > > > On Mon, Aug 22, 2016 at 5:17 AM, Nicolas Grekas < > > nicolas.grekas+...@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 > 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. -- Ferenc Kovács @Tyr43l - http://tyrael.hu