Re: [RFC] [Discussion] Resource to object conversion

From: Date: Mon, 20 Nov 2023 04:16:57 +0000
Subject: Re: [RFC] [Discussion] Resource to object conversion
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-121720@lists.php.net to get a copy of this message
Hi, On Thu, Nov 16, 2023 at 17:14 Jakub Zelenka <bukka@php.net> wrote: > I will personally vote against this if there is no is_resource > change as I think it's just too big BC break even for 9.0 - it will likely > require massive update of many code bases. As someone maintaining a large code-base going back to 5.0.0 and bitten in the past by the resource thing, I wonder whether it was previously discussed to have all these converted objects implement a Resource interface and have is_resource() check for that. Both the function and maybe also the interface could then also be marked as deprecated, but it would allow for a much more painless transition. Personally, I’m now relying on psalm to detect such issues, so if I had a vote I would selfishly vote yes anyways, but still: for those without static analysis, this would IMHO make things much easier. Philip

« previous php.internals (#121720) next »