Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 10, 2023

PHP 8.2 | ReservedNames: detect top-level namespace Random (RFC)

PHP 8.2 | NewClasses: add support for Random extension related classes (RFC)

PHP 8.2 | NewInterfaces: add support for Random extension related interfaces (RFC)

  • Random:
    . New extension that organizes and consolidates existing implementations
    related to random number generators. New, higher quality RNGs are available
    and scope issues are eliminated.

PHP 8.2 introduced a new extension Random, which declares its classes in the Random namespace and reserves that top-level namespace for use by PHP.

Includes tests.

Refs:

Related to #1348

jrfnl added 3 commits August 10, 2023 21:31
> - Random:
>   . New extension that organizes and consolidates existing implementations
>     related to random number generators. New, higher quality RNGs are available
>     and scope issues are eliminated.

PHP 8.2 introduced a new extension `Random`, which declares its classes in the `Random` namespace and reserves that top-level namespace for use by PHP.

This commit adjusts the `Namespaces\ReservedNames` sniff to allow for detection of namespace declarations using the top-level name `Random`.

Includes tests.

Refs:
* https://wiki.php.net/rfc/rng_extension
* https://wiki.php.net/rfc/random_extension_improvement
* php/php-src 8094
* php/php-src@4d8dd8d

Related to 1348
…s (RFC)

> - Random:
>   . New extension that organizes and consolidates existing implementations
>     related to random number generators. New, higher quality RNGs are available
>     and scope issues are eliminated.

Refs:
* https://wiki.php.net/rfc/rng_extension
* https://wiki.php.net/rfc/random_extension_improvement
* php/php-src 8094
* php/php-src@4d8dd8d

Related to 1348
…erfaces (RFC)

> - Random:
>   . New extension that organizes and consolidates existing implementations
>     related to random number generators. New, higher quality RNGs are available
>     and scope issues are eliminated.

Refs:
* https://wiki.php.net/rfc/rng_extension
* https://wiki.php.net/rfc/random_extension_improvement
* php/php-src 8094
* php/php-src@4d8dd8d

Related to 1348
@jrfnl jrfnl added enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 10, 2023
@jrfnl jrfnl added this to the 10.0.0 milestone Aug 10, 2023
@jrfnl jrfnl requested a review from wimg August 10, 2023 19:42
@wimg wimg merged commit fb6e79c into develop Aug 10, 2023
@wimg wimg deleted the php-8.2/rfc-random-extension branch August 10, 2023 20:32
@github-actions github-actions bot removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants