rfc:random_ext

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:random_ext [2021/10/07 13:03] – minor fix zeriyoshirfc:random_ext [2022/02/08 07:31] (current) – mark decline zeriyoshi
Line 1: Line 1:
 ====== PHP RFC: Move to RNG functions into ext/random ====== ====== PHP RFC: Move to RNG functions into ext/random ======
-  * Version: 1.0+  * Version: 1.1
   * Date: 2021-09-07   * Date: 2021-09-07
   * Author: Go Kudo <zeriyoshi@gmail.com>   * Author: Go Kudo <zeriyoshi@gmail.com>
-  * Status: Under Discussion+  * Status: Decline 
 + 
 +===== Note ===== 
 + 
 +This RFC has been moved to Decline, as it is no longer needed due to changes in the proposal.
  
 ===== Introduction ===== ===== Introduction =====
Line 43: Line 47:
 These features are provided in a single random.c / php_random.h, and ext/random is always bundled with all builds of PHP, as is ext/standard. These features are provided in a single random.c / php_random.h, and ext/random is always bundled with all builds of PHP, as is ext/standard.
  
-Will cause a BC Break for extensions and php-src downstream projects, Means that the following workaround needs to be done to support PHP 8.2 and later. +In addition, header files containing the following contents will continue to be provided for extensions and downstream projects that previously depended on ext/standard featuresThese are a transitional measure until the next major version and will be removed in the future.
- +
-<code c> +
-#if PHP_VERSION_ID >= 80200 +
-#include "ext/random/php_random.h" +
-#else +
-#include "ext/standard/php_lcg.h" +
-#include "ext/standard/php_rand.h" +
-#include "ext/standard/php_mt_rand.h" +
-#include "ext/standard/php_random.h" +
-#endif +
-</code> +
- +
-In general, BC Breaks should be avoided and, as we have done in the past, BC Breaks should not occur unnecessarily. +
- +
-However, there is now a need to sort these out in order to deal with other problems with PHP random numbers. I think this could be a good reason to allow this BC Break.+
  
-See the relevant [[rfc:rng_extension|PHP RFC: Random Extension 3.0]] and Internals ML (or the relevant thread in [[https://externals.io/message/115918|externals]]) for details.+  * standard/php_lcg.
 +  * standard/php_rand.
 +  * standard/php_mt_rand.h 
 +  * standard/php_random.h
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
-There are no disruptive changes to userland. However, there will be a BC Break in the downstream project.+none
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
rfc/random_ext.1633611794.txt.gz · Last modified: 2021/10/07 13:03 by zeriyoshi