🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

PHPStan 2.2: Invalid constant reported for Collator::setAttribute() #14720

Description

@eliashaeussler

Bug report

Since v2.2.0, PHPStan reports argument.invalidConstant on Collator::setAttribute() with Collator::ON as second parameter (see reproduction code).

Code snippet that reproduces the problem

https://phpstan.org/r/f499e8b6-ec8b-460d-8ead-fcb0870a8f1d

Expected output

There should be no error; it's totally fine to pass Collator::ON as constant.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions