@IluTov Thanks for the heads up! I just answered on the mailing list, and I do understand that participating on discussions is "key" to granting someone RFC voting rights. I will keep that in mind moving forward and make an effort to participate in discussions.
Good morning! Although I'm fairly confident, I'd like to confirm something withyou. PHP's __destruct function is immediately and always triggered when there are no more references to an object? For instance, if I were to create a new object of class B like this: new B();, would the __destruct function of class B be called right ( and always) after this line?
@IluTov Indeed. You can use Laravel's features - such as queues, cache, etc - and opt-out from any type of magic. In addition, static anaylsis will work as expected thanks to this package: github.com/nunomaduro/larastan.
@cmb The => symbol always means “evaluates to the expression on the right,” in all circumstances. (Named functions, anonymous functions, arrays, and match().)
@Crell Not sure if "pull the vote" will do any good. For historical reasons, it may be important to have a v2 where the concerns raised on the v1 are totally addressed.
Well, it’s loud and clear that in order to this RFC have some sort of consensus here, the patch needs to ideally contain all the required changes upfront. That was not clear for me at first.
You'll have way more experience than me in RFC processes - still learning here to be honest. Maybe in RFC needs to always be followed by a complete - and fully ready - pull request.
@Danack The improvements - suggested by Nikita - are indeed not yet in the patch provided by the RFC. Not sure if that should be "blocking" on moving the RFC into votes, as those improvements have no functional impact on user code.
It's not being ignored Joe. We are aware that those improvements - to the capture logic - are necessary before the feature land in PHP. Maybe we can update the section at the end of the RFC to be more clear about this.
@JoeWatkins In theory yes. And ideally, these optimizations would be introduced at the same time as this feature. And equally ported to PHP 7.4 => "Auto-capturing single-statement closures". I guess we can thinking about that once we decide if we want or not have this feature.
@JoeWatkins At the end of the RFC, we've talked about that: "Additionally, it is quite possible that the auto-capture logic could be improved to be smarter about what variables to capture and which not to. Such an optimization can be done at any time as it has no functional impact on user code."