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

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

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

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

2015-10-19 Thread Anatol Belski
ail.com>; > Dmitry Stogov <dmi...@zend.com>; PHP internals <internals@lists.php.net> > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > ReflectionFunctionAbstract::getClosure() > > Hello, internals! > > Just noticed this thread and want to clarify

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

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, >

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

2015-10-19 Thread Alexander Lisachenko
> > > Cc: Nikita Popov <nikita@gmail.com>; Dmitry Stogov <dmi...@zend.com > >; > > PHP internals <internals@lists.php.net> > > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > > ReflectionFunctionAbstract::getClo

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

2015-10-13 Thread Anatol Belski
;internals@lists.php.net> > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > ReflectionFunctionAbstract::getClosure() > > Hey: > > On Tue, Oct 13, 2015 at 6:12 AM, Anatol Belski <anatol@belski.net> > wrote: > > > > > &g

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

2015-10-12 Thread Dmitry Stogov
Hi Nikita, I think the effect of the remaining patch is negligible. It disables things, that shouldn't work by design, didn't work in fact and leaded to crashes. It might work only in some cases and only because of luck. So, I think it's better to commit this before next RC. Anatol is going to

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

2015-10-12 Thread Anatol Belski
alys...@sugarcrm.com>; Bob Weinand <bwo...@php.net>; > Anatol Belski <anatol@belski.net> > Subject: [PHP-DEV] Re: Forbid rebinding scope of closures created by > ReflectionFunctionAbstract::getClosure() > > > It would be great, if we stop any commits i

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

2015-10-12 Thread Nikita Popov
d.com> > > Cc: PHP internals <internals@lists.php.net>; Andrea Faulds <a...@ajf.me>; > Stas > > Malyshev <smalys...@sugarcrm.com>; Bob Weinand <bwo...@php.net>; > > Anatol Belski <anatol@belski.net> > > Subject: [PHP-DEV] Re: Forbid rebinding sc

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 <anatol@belski.net> > Cc: Dmitry Stogov <dmi...@zend.com>; PHP internals <internals@lists.php.net> > Subject: Re:

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

2015-10-12 Thread Dmitry Stogov
..@gmail.com] >> > Sent: Monday, October 12, 2015 8:57 PM >> > To: Dmitry Stogov <dmi...@zend.com> >> > Cc: PHP internals <internals@lists.php.net>; Andrea Faulds <a...@ajf.me>; >> Stas >> > Malyshev <smalys...@sugarcrm.com>; Bob We

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

2015-10-12 Thread Anatol Belski
m> > >> > Cc: PHP internals <internals@lists.php.net>; Andrea Faulds > >> > <a...@ajf.me>; > >> Stas > >> > Malyshev <smalys...@sugarcrm.com>; Bob Weinand <bwo...@php.net>; > >> > Anatol Belski <anatol@bels

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

2015-10-12 Thread Xinchen Hui
@belski.net> > > Cc: Dmitry Stogov <dmi...@zend.com>; PHP internals < > internals@lists.php.net> > > Subject: Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by > > ReflectionFunctionAbstract::getClosure() > > > > On Mon,

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

2015-10-10 Thread Andrea Faulds
Hi Nikita, Nikita Popov wrote: We have recently been reviewing the interaction between ReflectionFunctionAbstract::getClosure(), a mechanism which converts an ordinary function or method into a "fake" closure, and closure rebinding using Closure::bindTo() and Closure::call(). It turns out