rfc:dedicated_stream_bucket

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:dedicated_stream_bucket [2024/03/19 21:03] kocsismaterfc:dedicated_stream_bucket [2024/04/11 18:16] (current) kocsismate
Line 2: Line 2:
   * Date: 2024-01-19   * Date: 2024-01-19
   * Author: Máté Kocsis <kocsismate@php.net>   * Author: Máté Kocsis <kocsismate@php.net>
-  * Status: Under Discussion+  * Status: Implemented
   * Target: next minor version (possibly PHP 8.4)   * Target: next minor version (possibly PHP 8.4)
   * Implementation: https://github.com/php/php-src/pull/13111   * Implementation: https://github.com/php/php-src/pull/13111
Line 60: Line 60:
 ===== The $bucket property ==== ===== The $bucket property ====
  
-The ''$bucket'' property is a stream bucket resource which is about to be migrated to an object in a major PHP version as per [[rfc:resource_to_object_conversion|Resource to object conversion]]. However, this property won't be useful anymore as soon as it becomes an object, since it can be inlined directly into the containing stream bucket class. Therefore, this RFC proposes to emit a deprecation notice as soon as the resource to object migration happens. The consequent major version should then get rid of the property altogether.+The ''$bucket'' property is a stream bucket resource which is about to be migrated to an object in a major PHP version as per [[rfc:resource_to_object_conversion|Resource to object conversion]]. However, this property won't be useful anymore as soon as it becomes an object, since it can be inlined directly into the containing stream bucket class. Therefore, this RFC proposes to emit a deprecation notice as soon as the resource to object migration happens (in a major PHP version). The consequent major version should then get rid of the property altogether.
  
 ===== The $datalen property ==== ===== The $datalen property ====
Line 66: Line 66:
 The name of this property doesn't conform to the currently used naming conventions: we usually try to avoid abbreviations whenever possible (e.g. when the full name is not too verbose, and the abbreviation is not an extremely common term - like ''$id''). Since the difference between ''len'' and ''length'' is just 3 characters, I don't think that using this abbreviation is really worth it. Therefore, this RFC proposes to add a ''$dataLength'' property. The name of this property doesn't conform to the currently used naming conventions: we usually try to avoid abbreviations whenever possible (e.g. when the full name is not too verbose, and the abbreviation is not an extremely common term - like ''$id''). Since the difference between ''len'' and ''length'' is just 3 characters, I don't think that using this abbreviation is really worth it. Therefore, this RFC proposes to add a ''$dataLength'' property.
  
-Additionally, the ''$datalen'' property would become deprecated in favor of ''$dataLength'' in the subsequent minor or major version after the targeted version (possibly PHP 8.5 or PHP 9.0), and would be removed in the next to next major version (possibly PHP 10).+Additionally, the ''$datalen'' property would become deprecated in favor of ''$dataLength'' in the subsequent minor or major version after the target version (possibly PHP 8.5 or PHP 9.0), and would be removed in the next to next major version (possibly PHP 10).
  
 ===== The proposed class ==== ===== The proposed class ====
Line 77: Line 77:
     /**     /**
      * @var resource      * @var resource
-     * @deprecated+     * @deprecated after resource to object conversion happens
      */      */
     public $bucket;     public $bucket;
     public string $data;     public string $data;
-    /** @deprecated */+    /** @deprecated in PHP 8.5 or PHP 9.0 whichever comes next */
     public int $datalen;     public int $datalen;
     public int $dataLength;     public int $dataLength;
Line 90: Line 90:
 ===== Vote ===== ===== Vote =====
  
-The vote requires 2/3 majority in order to be accepted.+The vote requires 2/3 majority in order to be accepted. The vote is going to be closed on 2024-04-11 10:00 UTC.
  
 ==== Primary vote ==== ==== Primary vote ====
  
-<doodle title="Add the StreamBucket class as proposed?" auth="kocsismate" voteType="single" closed="true" closeon="2024-03-19T10:00:00Z">+<doodle title="Add the StreamBucket class as proposed?" auth="kocsismate" voteType="single" closed="no" closeon="2024-04-11T10:00:00Z">
    * yes    * yes
    * no    * no
 </doodle> </doodle>
  
rfc/dedicated_stream_bucket.1710882219.txt.gz · Last modified: 2024/03/19 21:03 by kocsismate