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

From: Date: Thu, 25 Jan 2024 14:13:54 +0000
Subject: Re: Re: [RFC] [Vote] Resource to object conversion
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-122256@lists.php.net to get a copy of this message
Hello Mate, I've just closed the votes with the following outcomes: > - The primary vote for the described approach for converting resources to > objects was accepted unanimously (30 yes, 0 no) > - Primary stream resources are going to be migrated in a major version, > rather in any minor or major version (23 vs. 7 votes) > - Auxiliary stream resources are going to be migrated in a major version, > rather in any minor or major version (16 vs. 14 votes) > - The Process resource is going to be migrated in the next major version, > rather in the next minor or major version (15 vs. 14 votes) > - Resources of other extensions are going to be migrated in any minor or > major version, rather than in any major version (17 vs. 12 votes) > Congrats for this result :) I just had a look at the Symfony codebase and FYI we do use cast-to-integers for a few resources: - for curl - that's already supported by CurlHandle so this is seamless - for DBA, because dba_list() <https://www.php.net/dba_list> works by resourceid - for resources created by stream_socket_server() and stream_socket_accept() I only checked situations where the resource id is used as an index in an array, there might be some others (but not a lot, if any). It looks like we should implement the cast to int for these resource types at least. Cheers, Nicolas

« previous php.internals (#122256) next »