Skip to content

LDAP - Wrong phpdoc for safe functions after PHP 8.1 #479

Description

@psuet

For nearly all LDAP functions in PHP 8.1

The ldap parameter expects an LDAP\Connection instance now; previously, a valid ldap link resource was expected.
https://www.php.net/manual/en/function.ldap-add.php

Currently Safe notes that the first parameter is still a resource. Thus PHPStan (and other tooling) returns an error when using the safe functions:

Parameter #1 $ldap of function Safe\ldap_add expects resource|null, LDAP\Connection given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions