Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Pierre Joye
On Aug 23, 2016 5:26 AM, "Levi Morrison" wrote: > > Anyone oppose to emitting E_DEPRECATED for a parameter other than an > object or null? This opens up the possibility to use it for something > no earlier than 8.0. I won't oppose it and sounds reasonable. I still prefer Julien's

[PHP-DEV] Re: [RFC][VOTE] Add session_create_id() function

2016-08-22 Thread Yasuo Ohgaki
Hi all, On Wed, Aug 10, 2016 at 6:14 PM, Yasuo Ohgaki wrote: > > This is RFC for adding session_create_id() function. > > Session ID string uses special binary to string conversion. Users > should write lengthy and slow code to have the same session ID string > as session

[PHP-DEV] Re: [RFC][VOTE] Add session_gc() function

2016-08-22 Thread Yasuo Ohgaki
Hi all, On Wed, Aug 10, 2016 at 6:30 PM, Yasuo Ohgaki wrote: > > This RFC is to add session_gc() function. > > session_gc() function is required API for periodic session GC that is > best practice for production web sites. > > https://wiki.php.net/rfc/session-gc > It requires

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Levi Morrison
On Mon, Aug 22, 2016 at 3:40 PM, Rowan Collins wrote: > > On 22/08/2016 20:57, Levi Morrison wrote: >> >> I think the ideal but difficult path forward is to find where it was >> introduced and pray the commit log or something else will indicate the >> behavior. > > >

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Rowan Collins
On 22/08/2016 20:57, Levi Morrison wrote: I think the ideal but difficult path forward is to find where it was introduced and pray the commit log or something else will indicate the behavior. OK, I'll bite. Christoph already linked to this comment in the source

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-22 Thread Levi Morrison
On Mon, Aug 22, 2016 at 2:56 PM, Dan Ackroyd wrote: > On 22 August 2016 at 06:33, Nikita Popov wrote: > > > > Hi. > > > > Now that we have made ReflectionType::__toString() be useless and not > > represent the type, this method should be deprecated

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-22 Thread Dan Ackroyd
On 22 August 2016 at 06:33, Nikita Popov wrote: > > Hi. > > Now that we have made ReflectionType::__toString() be useless and not > represent the type, this method should be deprecated in favor of using > ReflectionNamedType::__toString(), ::allowsNull() and any further

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Levi Morrison
On Mon, Aug 22, 2016 at 10:30 AM, Christoph M. Becker wrote: > On 22.08.2016 at 18:00, Julien Pauli wrote: > > > I agree this is a BC break and should not stay as-is in source code. > > I wonder why we have more than 100 lines of "Backward incompatible > changes" in the PHP

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Rowan Collins
On 22/08/2016 17:30, Christoph M. Becker wrote: I think @Alexander is right. >We should allow passing a string, and perform some Late Static Binding >through it. >That would solve the BC Break problem as well as extend the feature in >a more PHP-friendly way. Are you sure that would solve the

Re: [PHP-DEV] [RFC] orphan extensions cleanup

2016-08-22 Thread Christoph M. Becker
On 22.08.2016 at 18:52, Anatol Belski wrote: > Hi Pierre, > >> -Original Message- >> From: Pierre Joye [mailto:pierre@gmail.com] >> Sent: Friday, August 19, 2016 1:00 PM >> To: Christoph Becker >> Cc: PHP internals ; Kalle Sommer Nielsen

RE: [PHP-DEV] [RFC] orphan extensions cleanup

2016-08-22 Thread Anatol Belski
Hi Pierre, > -Original Message- > From: Pierre Joye [mailto:pierre@gmail.com] > Sent: Friday, August 19, 2016 1:00 PM > To: Christoph Becker > Cc: PHP internals ; Kalle Sommer Nielsen > ; Stanislav Malyshev

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Julien Pauli
On Mon, Aug 22, 2016 at 6:30 PM, Christoph M. Becker wrote: > On 22.08.2016 at 18:00, Julien Pauli wrote: > >> I agree this is a BC break and should not stay as-is in source code. > > I wonder why we have more than 100 lines of "Backward incompatible > changes" in the PHP

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Christoph M. Becker
On 22.08.2016 at 18:00, Julien Pauli wrote: > I agree this is a BC break and should not stay as-is in source code. I wonder why we have more than 100 lines of "Backward incompatible changes" in the PHP 7.1.0beta3 changelog[1], if BC breaks shouldn't be introduced in a minor release. > It makes

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Julien Pauli
I agree this is a BC break and should not stay as-is in source code. It makes some testsuites fail, that did not fail before ; thus it breaks things. I think @Alexander is right. We should allow passing a string, and perform some Late Static Binding through it. That would solve the BC Break

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Alexander Lisachenko
First argument can be a normal string with a valid scope class name for static methods. This can be useful for calling parent static methods, see my example. I think this will be comparable with Closure::call() method and scope binding. понедельник, 22 августа 2016 г. пользователь Rowan Collins

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Rowan Collins
On 22/08/2016 15:32, Alexander Lisachenko wrote: If the first argument for invoke() and invokeArgs() for static methods will be a string with compatible class name for the scope, then it can be used as a scope modifier (like second argument for Closure::bind($instance, $scopeClassName)) The

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Rowan Collins
On 22/08/2016 16:40, Christoph M. Becker wrote: It is still ignored if it is a valid object, so the current beta's > behaviour doesn't actually make a lot of sense. Well, see . Only as of 7.1.0beta3 ::invoke() matches the behavior of ::invokeArgs(). OK, so that's a

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1 to be object, string given

2016-08-22 Thread Christoph M. Becker
On 22.08.2016 at 16:38, Rowan Collins wrote: > On 22/08/2016 12:17, Nicolas Grekas wrote: >> in ReflectionMethod::invoke(): >> >> the method doesn't accept a string as first argument anymore, see e.g.: >> >> https://3v4l.org/pImmv > > To be precise, in prior versions, the first argument was

[PHP-DEV] Re: BC break: ReflectionMethod::invoke() expects parameter 1 to beobject, string given

2016-08-22 Thread Christoph M. Becker
On 22.08.2016 at 13:17, Nicolas Grekas wrote: > 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

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Rowan Collins
On 22/08/2016 12:17, Nicolas Grekas wrote: in ReflectionMethod::invoke(): the method doesn't accept a string as first argument anymore, see e.g.: https://3v4l.org/pImmv To be precise, in prior versions, the first argument was completely ignored for static methods: https://3v4l.org/8o4Hm

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Alexander Lisachenko
Hello, there is one more issue with ReflectionMethod::invoke() for static methods: it's impossible to call an overridden parent static method and preserve a scope information: // https://3v4l.org/ASntq class foo { static function bar() { echo self::class, ' vs ', static::class,

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Ferenc Kovacs
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+...@gmail.com> wrote: > > > > > Hello, > > > > > > now that the BC break on

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Alexander Lisachenko
If the first argument for invoke() and invokeArgs() for static methods will be a string with compatible class name for the scope, then it can be used as a scope modifier (like second argument for Closure::bind($instance, $scopeClassName)) 2016-08-22 17:29 GMT+03:00 Alexander Lisachenko

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Pierre Joye
On Aug 22, 2016 9:01 PM, "Levi Morrison" 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(): > > >

Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Levi Morrison
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.: > >

[PHP-DEV] BAD Benchmark Results for PHP Master 2016-08-22

2016-08-22 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-08-22 06:23:07+03:00 commit: fd8e203 previous commit:6416312 revision date: 2016-08-21 12:53:01-07:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() andutf8_encode()

2016-08-22 Thread Christoph M. Becker
On 22.08.2016 at 12:55, Michael Wallner wrote: > On 22/08/16 12:44, Rowan Collins wrote: > >> As far as I can see, these functions exist because the XML parser >> infrastructure needed them, and someone thought it might be handy to >> expose them to users. Funnily enough, the internal versions

[PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

2016-08-22 Thread Nicolas Grekas
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

Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode()

2016-08-22 Thread Lester Caine
On 22/08/16 11:55, Michael Wallner wrote: >> As far as I can see, these functions exist because the XML parser >> > infrastructure needed them, and someone thought it might be handy to >> > expose them to users. Funnily enough, the internal versions actually >> > take a parameter for the target

Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode()

2016-08-22 Thread Michael Wallner
On 22/08/16 12:44, Rowan Collins wrote: > As far as I can see, these functions exist because the XML parser > infrastructure needed them, and someone thought it might be handy to > expose them to users. Funnily enough, the internal versions actually > take a parameter for the target encoding, but

Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode()

2016-08-22 Thread Rowan Collins
On 22/08/2016 02:52, Yasuo Ohgaki wrote: Since these are XML module functions, the name would be xml_latin1_to_utf8() and xml_utf8_to_latin1(). Suggestions for names are appreciated. From a user's point of view, these functions have nothing to do with XML, so I'm not sure the prefix really

Re: [PHP-DEV] Incorrect Argument Count Error

2016-08-22 Thread Davey Shafik
On Mon, Aug 22, 2016 at 5:59 PM, Derick Rethans wrote: > On Fri, 19 Aug 2016, Davey Shafik wrote: > > > b) a huge BC break (stuff that currently throws a warning in > > strict_types mode will now throw an exception, similar BC break as > > we're implementing for userland

Re: [PHP-DEV] Incorrect Argument Count Error

2016-08-22 Thread Derick Rethans
On Fri, 19 Aug 2016, Davey Shafik wrote: > b) a huge BC break (stuff that currently throws a warning in > strict_types mode will now throw an exception, similar BC break as > we're implementing for userland functions regardless of strict_types) IMO, that's not acceptable at all between 7.0 and

Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode()

2016-08-22 Thread Michael Wallner
On 22/08/16 03:52, Yasuo Ohgaki wrote: > I'll update the RFC to have aliases rather than removing. Since these > are XML module functions, the name would be xml_latin1_to_utf8() and > xml_utf8_to_latin1(). Suggestions for names are appreciated. +1, I think those are the names to go. --

Re: [PHP-DEV] Incorrect Argument Count Error

2016-08-22 Thread Davey Shafik
On Fri, Aug 19, 2016 at 10:27 PM, Kalle Sommer Nielsen wrote: > 2016-08-19 15:05 GMT+02:00 Davey Shafik : > > Hey Internals, > > > > I'm working on the patch to change the error exception to > > \ArgumentCountError instead of \Error when too few, or too many