From 1b1be45ea1712f474780722cd17b4b2354983d17 Mon Sep 17 00:00:00 2001 From: Anton Smirnov Date: Thu, 8 Dec 2022 21:35:45 +0200 Subject: [PATCH] Update docs to reflect PHP 8.2 final release --- README.md | 13 +++++++------ docs/compatibility.rst | 19 +++++++++++++++++++ docs/index.rst | 12 ++++++------ docs/performance.rst | 2 +- 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6a32975..023fbfc 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,7 @@ [![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/sandfox/php-random-polyfill/master.svg?style=flat-square)](https://gitlab.com/sandfox/php-random-polyfill/-/pipelines) [![Codecov](https://img.shields.io/codecov/c/gl/sandfox/php-random-polyfill?style=flat-square)](https://codecov.io/gl/sandfox/php-random-polyfill/) -This is a polyfill for the new `ext-random` extension that will be released with PHP 8.2. - -RFC: - -* https://wiki.php.net/rfc/rng_extension -* https://wiki.php.net/rfc/random_extension_improvement +This is a polyfill for the new `ext-random` extension that was released with PHP 8.2. ## Requirements @@ -29,6 +24,12 @@ The library aims to be compatible with `ext-random` as released in PHP 8.2.0 and ## Documentation +### Random Extension + +Read the official PHP doc: https://www.php.net/manual/en/book.random.php + +### The Polyfill + Read full documentation here: Also on Read the Docs: diff --git a/docs/compatibility.rst b/docs/compatibility.rst index f1d1234..342b5d3 100644 --- a/docs/compatibility.rst +++ b/docs/compatibility.rst @@ -4,9 +4,28 @@ Compatibility Notes PHP === +.. note:: + Random Extension doc on the PHP website: + https://www.php.net/manual/en/book.random.php + The library aims to be compatible with ``ext-random`` as released in PHP 8.2.0 and subsequent patch releases. The library will not be a full replacement for ``ext-random`` and total compatibility does not seem to be achievable. +Available classes: + +* This polyfill: + + * `Random\\Randomizer `__ + * `Random\\Engine\\Mt19937 `__ + * `Random\\Engine\\PcgOneseq128XslRr64 `__ + * `Random\\Engine\\Xoshiro256StarStar `__ + +* From `symfony/polyfill-php82 `__: + + * `Random\\Engine `__ + * `Random\\Engine\\CryptoSafeEngine `__ + * `Random\\Engine\\Secure `__ + Version 1.99.0 ============== diff --git a/docs/index.rst b/docs/index.rst index e2c8c49..ba0c201 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,12 +3,7 @@ Random Extension Polyfill |Packagist| |GitLab| |GitHub| |Bitbucket| |Gitea| -This is a polyfill for the new ``ext-random`` extension that will be released with PHP 8.2. - -RFC: - -* https://wiki.php.net/rfc/rng_extension -* https://wiki.php.net/rfc/random_extension_improvement +This is a polyfill for the new ``ext-random`` extension that was released with PHP 8.2. Requirements ============ @@ -23,6 +18,11 @@ Installation composer require 'arokettu/random-polyfill' +Random Extension Documentation +============================== + +On the PHP website: https://www.php.net/manual/en/book.random.php + Documentation ============= diff --git a/docs/performance.rst b/docs/performance.rst index 75344f9..b1a071f 100644 --- a/docs/performance.rst +++ b/docs/performance.rst @@ -12,7 +12,7 @@ https://github.com/arokettu/random-polyfill-perf * Secure engine is mostly unaffected by the choice of backend (except for nextInt() case) * PHP 7: - * With GMP installed, all engines is approximately 400 times slower than native + * With GMP installed, all engines are approximately 400 times slower than native * Mersenne Twister is consistently 400 times slower than native, whether you use GMP or not * PCG is 100 times slower without GMP and xoshiro256** is 50 times slower without GMP * PHP 8: