Skip to content

Specify more precise generic typings for standard Randomizer array-based methods #15256

Closed

Description

@mikethea1

Bug report

See linked code snippet showing incomplete typings for shuffleArray and pickArrayKeys.

Code snippet that reproduces the problem

https://phpstan.org/r/831d5751-4960-4fe4-84b0-6e3c9d5dc1ea

Expected output

No error

Did PHPStan help you today? Did it make you happy in any way?

Love the fast pace of bugfixes and performance improvements!

Activity

  1. changed the title [-]Randomizer API typings could be improved[/-] [+]Specify more precise generic typings for standard Randomizer array-based methods[/+] on Sep 17, 2026
  2. added this to the Easy fixes milestone on Sep 17, 2026
  3. phpstan-bot commented on Sep 19, 2026

    @phpstan-bot
    Contributor

    Closed via merging phpstan/phpstan-src#6469

  4. github-actions commented on Oct 21, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked as resolved and limited conversation to collaborators on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions