rfc:resource_to_object_conversion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:resource_to_object_conversion [2023/12/24 13:23] kocsismaterfc:resource_to_object_conversion [2024/05/24 12:11] (current) kocsismate
Line 1: Line 1:
 ====== Resource to object conversion ====== ====== Resource to object conversion ======
   * Date: 2023-10-31   * Date: 2023-10-31
-  * Author: Máté Kocsis kocsismate@php.net +  * Author: Máté Kocsis <kocsismate@php.net> 
-  * Status: Under Discussion+  * Status: Accepted
  
 ===== Introduction ===== ===== Introduction =====
Line 134: Line 134:
 The rest of the built-in extensions which currently expose resources are the following: The rest of the built-in extensions which currently expose resources are the following:
  
-  * **COM**+  * **COM** (implementation: https://github.com/php/php-src/pull/14282)
     * **com_dotnet_istream_wrapper**     * **com_dotnet_istream_wrapper**
     * **com_dotnet_dispatch_wrapper**     * **com_dotnet_dispatch_wrapper**
-  * **DBA**+  * **DBA** (implementation: https://github.com/php/php-src/pull/14239)
     * **dba**: connection resource returned by ''dba_open()''     * **dba**: connection resource returned by ''dba_open()''
     * **dba persistent**: persistent connection resource  returned by ''dba_popen()''     * **dba persistent**: persistent connection resource  returned by ''dba_popen()''
-  * **ODBC** (implementation: https://github.com/php/php-src/pull/12040/)+  * **ODBC** (implementation: https://github.com/php/php-src/pull/12040)
     * **odbc link**: connection resource returned by ''odbc_connect()''     * **odbc link**: connection resource returned by ''odbc_connect()''
     * **odbc link persistent**: persistent connection returned by ''odbc_pconnect()''     * **odbc link persistent**: persistent connection returned by ''odbc_pconnect()''
     * **odbc result**: result resources returned by various ''odbc_*'' functions     * **odbc result**: result resources returned by various ''odbc_*'' functions
-  * **SOAP**+  * **SOAP** (implementation: https://github.com/php/php-src/pull/14121, https://github.com/php/php-src/pull/14174)
     * **SOAP SDL**: ''SoapClient::$sdl''     * **SOAP SDL**: ''SoapClient::$sdl''
     * **SOAP table**: ''SoapClient::$typemap''     * **SOAP table**: ''SoapClient::$typemap''
Line 153: Line 153:
 ===== Vote ===== ===== Vote =====
  
-The RFC consists of 5 votes, one for accepting the implementation approach and one for each resource category to decide when it is possible to convert them. Since the majority of the resource migrations in question don't yet have an implementation, most voting choices are intentionally left vague so that they only define whether a resource group can only be migrated in a major version or the conversion can happen in minor versions as well. Each vote requires 2/3 majority in order to be accepted.+The RFC consists of a primary vote for accepting the implementation approach and 4 secondary votes for each resource category to decide when it is possible to convert them. Since the majority of the resource migrations in question don't yet have an implementation, most voting choices are intentionally left vague so that they only define whether a resource group can only be migrated in a major version or the conversion can happen in minor versions as well. The primary vote requires 2/3, while the secondary ones require a simple majority in order to be accepted.
  
 ==== Implementation ==== ==== Implementation ====
  
-<doodle title="Accept the described approach for converting resources to objects?" auth="kocsismate" voteType="single" closed="true" closeon="2024-01-18T08:00:00Z">+<doodle title="Accept the described approach for converting resources to objects?" auth="kocsismate" voteType="single" closed="yes" closeon="2024-01-19T10:00:00Z">
    * yes    * yes
    * no    * no
Line 164: Line 164:
 ==== Primary stream resources (stream, persistent stream) ==== ==== Primary stream resources (stream, persistent stream) ====
  
-<doodle title="When should the migration of the primary stream resources happen?" auth="kocsismate" voteType="single" closed="true" closeon="2024-01-18T08:00:00Z">+<doodle title="When should the migration of the primary stream resources happen?" auth="kocsismate" voteType="single" closed="yes" closeon="2024-01-19T10:00:00Z">
    * only in a major version (e.g. PHP 9.0)    * only in a major version (e.g. PHP 9.0)
    * in any minor or major version (e.g. PHP 8.4)    * in any minor or major version (e.g. PHP 8.4)
Line 171: Line 171:
 ==== Auxiliary stream resources (contexts, filters, brigades, buckets) ==== ==== Auxiliary stream resources (contexts, filters, brigades, buckets) ====
  
-<doodle title="When should the migration of the auxiliary stream resources happen?" auth="kocsismate" voteType="single" closed="true" closeon="2024-01-18T08:00:00Z">+<doodle title="When should the migration of the auxiliary stream resources happen?" auth="kocsismate" voteType="single" closed="yes" closeon="2024-01-19T10:00:00Z">
    * only in a major version (e.g. PHP 9.0)    * only in a major version (e.g. PHP 9.0)
    * in any minor or major version (e.g. PHP 8.4)    * in any minor or major version (e.g. PHP 8.4)
Line 178: Line 178:
 ==== Process resource ==== ==== Process resource ====
  
-<doodle title="When should the migration of the Process resource happen?" auth="kocsismate" voteType="single" closed="true" closeon="2024-01-18T08:00:00Z">+<doodle title="When should the migration of the Process resource happen?" auth="kocsismate" voteType="single" closed="yes" closeon="2024-01-19T10:00:00Z">
    * in the next major version (e.g. PHP 9.0)    * in the next major version (e.g. PHP 9.0)
    * in the next minor or major version (e.g. PHP 8.4)    * in the next minor or major version (e.g. PHP 8.4)
Line 185: Line 185:
 ==== Other resources ==== ==== Other resources ====
  
-<doodle title="When should the migration of the resources of other extensions happen?" auth="kocsismate" voteType="single" closed="true" closeon="2024-01-18T08:00:00Z">+<doodle title="When should the migration of the resources of other extensions happen?" auth="kocsismate" voteType="single" closed="false" closeon="2024-01-19T10:00:00Z">
    * only in a major version (e.g. PHP 9.0)    * only in a major version (e.g. PHP 9.0)
    * in any minor or major version (e.g. PHP 8.4)    * in any minor or major version (e.g. PHP 8.4)
rfc/resource_to_object_conversion.1703424228.txt.gz · Last modified: 2023/12/24 13:23 by kocsismate