2015-10-22 18:48 GMT+03:00 Julien Pauli <jpa...@php.net>: > 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. > > We can't allow PHP to release with a known crashing behavior. > > Perhaps we'll find new ways to do things in 7.1 or next 8.0. >
Good morning! Thank you, Julien, for paying an attention to my message and pointing to the things that are more important. I'm absolutely agree with you that the stability of the core is priority task for now, so it will be better to keep php7.0 core as stable as possible. Of course, this patch introduces some BC breaks, because now code that accepts \Closure instance should be able to check, if this instance of closure from ReflectionFunction or not to decide about possibility of binding. Technically they should be equal. Today I was able to test my code with RC5 and things aren't so bad, all main features working, except minor ones ) All dynamic methods can be called with closures, because I only need instance rebinding for closure, not the scope, because it's already passed as argument for getClosure($this). Simplified example https://3v4l.org/WRuZ6. For static methods, keeping LSB with closures is tricky, but it works via forward_static_call_array and putting it into the closure, which can be easily binded to the required scope: https://3v4l.org/kLN0E So, it's not a big deal for me anymore, all other things are tricky and aren't used very often. Thanks!