Skip to content

constant wildcard are not working #22

Description

@mitelg

given a class, that defines multiple constants with the same prefix. with PHPStan it is possible to declare e.g. a parameter in the following way:

use Symfony\Component\HttpFoundation\Request;

/**
 * @param Request::METHOD_* $httpMethod
 */
public function foo(string $httpMethod): void

so every value of a constant of the Request class that starts with METHOD_ is allowed.

TypePHP is currently failing with

Argument $httpMethod must be literal Symfony\Component\HttpFoundation\Request::METHOD_*, string 'POST' given

Activity

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

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions