Skip to content

Closure signature PHPDoc seems to corrupt variadics #3506

Closed
phpstan/phpstan-src
#4173

Description

@dktapps

Bug report

PhpDoc describing Closure signatures seems to break the type of variadic closure parameters.

Code snippet that reproduces the problem

https://phpstan.org/r/131d81a7-ffa4-4ee5-bf1e-1028b0bd478b
checkExplicitMixed: true is required to reproduce this bug.

If I remove the mixed... parameter from the PhpDoc, it shuts up.

Expected output

No errors.

Actual output

 ------ -------------------------------------------------------------
  Line   Test.php
 ------ -------------------------------------------------------------
  15     Only iterables can be unpacked, mixed given in argument #1.
 ------ -------------------------------------------------------------

 [ERROR] Found 1 error

Activity

  1. added this to the Easy fixes milestone on Jun 20, 2020
  2. github-actions commented on Aug 28, 2025

    @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.

  3. locked as resolved and limited conversation to collaborators on Aug 28, 2025
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