Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-23 Thread Alexander Lisachenko
2015-10-22 18:48 GMT+03:00 Julien Pauli : > This is very tricky use case IMO. > > We should absolutely focus on stability, and if we can't find a way to > make things safe, we forbid them > for the stability sake. If there are no way to have stable things, > well, that's pitty but it's like that.

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-22 Thread Kalle Sommer Nielsen
2015-10-22 17:48 GMT+02:00 Julien Pauli : > This is very tricky use case IMO. > > We should absolutely focus on stability, and if we can't find a way to > make things safe, we forbid them > for the stability sake. If there are no way to have stable things, > well, that's pitty but it's like that. >

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-22 Thread Julien Pauli
On Mon, Oct 19, 2015 at 12:34 PM, Alexander Lisachenko wrote: > 2015-10-19 12:19 GMT+03:00 Nikita Popov : > >> This change is primarily targeting userland methods, so your use-case is >> exactly the one this is supposed to prevent. Note that you can still use >> ->bindTo($object). The only thing y

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-19 Thread Alexander Lisachenko
2015-10-19 12:19 GMT+03:00 Nikita Popov : > This change is primarily targeting userland methods, so your use-case is > exactly the one this is supposed to prevent. Note that you can still use > ->bindTo($object). The only thing you cannot do is ->bindTo($object, > get_class($object)). It's very

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-19 Thread Nikita Popov
On Mon, Oct 19, 2015 at 10:18 AM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > Hello, internals! > > Just noticed this thread and want to clarify some things with getClosure() > method. If i understood correctly, ReflectionFunctionAbstract::getClosure() > should return non-rebindable c

RE: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-19 Thread Anatol Belski
Hi Alexander, > -Original Message- > From: Alexander Lisachenko [mailto:lisachenko...@gmail.com] > Sent: Monday, October 19, 2015 10:19 AM > To: Anatol Belski > Cc: Xinchen Hui ; Nikita Popov ; > Dmitry Stogov ; PHP internals > Subject: Re: [PHP-DEV] Re: Forb

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-19 Thread Alexander Lisachenko
: > > > > > > > > > > > > -Original Message- > > > > From: Nikita Popov [mailto:nikita....@gmail.com] > > > > Sent: Monday, October 12, 2015 10:33 PM > > > > To: Anatol Belski > > > > Cc: Dmitry Stogov ; P

RE: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-13 Thread Anatol Belski
2, 2015 10:33 PM > > > To: Anatol Belski > > > Cc: Dmitry Stogov ; PHP internals < > > internals@lists.php.net> > > > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures > > > created by > > > ReflectionFunctionAbstract::getClosure()

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Xinchen Hui
> internals@lists.php.net> > > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > > ReflectionFunctionAbstract::getClosure() > > > > On Mon, Oct 12, 2015 at 10:22 PM, Anatol Belski > > wrote: > > > > > Hi, > > > >

RE: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Anatol Belski
> -Original Message- > From: Dmitry Stogov [mailto:dmi...@zend.com] > Sent: Monday, October 12, 2015 11:55 PM > To: Nikita Popov > Cc: Anatol Belski ; PHP internals > > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > ReflectionFunc

RE: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Anatol Belski
> -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Monday, October 12, 2015 10:33 PM > To: Anatol Belski > Cc: Dmitry Stogov ; PHP internals > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > ReflectionFunctio

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Dmitry Stogov
On Mon, Oct 12, 2015 at 11:32 PM, Nikita Popov wrote: > On Mon, Oct 12, 2015 at 10:22 PM, Anatol Belski > wrote: > >> Hi, >> >> > -Original Message- >> > From: Nikita Popov [mailto:nikita@gmail.com] >> > Sent: Monday, October 12, 2015 8:57 PM >> > To: Dmitry Stogov >> > Cc: PHP inte

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Nikita Popov
On Mon, Oct 12, 2015 at 10:22 PM, Anatol Belski wrote: > Hi, > > > -Original Message- > > From: Nikita Popov [mailto:nikita@gmail.com] > > Sent: Monday, October 12, 2015 8:57 PM > > To: Dmitry Stogov > > Cc: PHP internals ; Andrea Faulds ; > Stas > > Malyshev ; Bob Weinand ; > > Anat

RE: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Anatol Belski
Hi, > -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Monday, October 12, 2015 8:57 PM > To: Dmitry Stogov > Cc: PHP internals ; Andrea Faulds ; Stas > Malyshev ; Bob Weinand ; > Anatol Belski > Subject: [PHP-DEV] Re: Forbid rebinding scope of closures creat