Skip to content

Stub PDO constants? #2840

@BenMorel

Description

@BenMorel

Feature request

Hi, when I first attempted to run phpstan analyze against doctrine/dbal, I got the following report:

Access to undefined constant PDO::PGSQL_ATTR_DISABLE_PREPARES.

Then I installed the php-pgsql package, which got rid of the error, as the constant is now defined in PDO.

Shouldn't phpstan be aware of all possible built-in constants though, even if the actual PDO driver isn't installed on the machine running the tests?

Shouldn't phpstan stub these constants?

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